Remove unused and deprecated Parity methods

This commit is contained in:
The MMGen Project 2021-07-29 14:20:43 +00:00
commit 74c617f463
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 3 additions and 16 deletions

View file

@ -114,8 +114,7 @@ class TokenBase(MMGenObject): # ERC20
from .pyethereum.transactions import Transaction
if chain_id is None:
chain_id_method = ('parity_chainId','eth_chainId')['eth_chainId' in self.rpc.caps]
chain_id = int(await self.rpc.call(chain_id_method),16)
chain_id = int(await self.rpc.call('eth_chainId'),16)
tx = Transaction(**tx_in).sign(key,chain_id)
hex_tx = rlp.encode(tx).hex()
coin_txid = CoinTxID(tx.hash.hex())

View file

@ -88,7 +88,6 @@ class EthereumMMGenTX:
return ETHNonce(int(await self.rpc.call('parity_nextNonce','0x'+self.inputs[0].addr),16))
async def make_txobj(self): # called by create_raw()
chain_id_method = ('parity_chainId','eth_chainId')['eth_chainId' in self.rpc.caps]
self.txobj = {
'from': self.inputs[0].addr,
'to': self.outputs[0].addr if self.outputs else Str(''),
@ -96,7 +95,7 @@ class EthereumMMGenTX:
'gasPrice': self.fee_abs2rel(self.usr_fee,to_unit='eth'),
'startGas': self.start_gas,
'nonce': await self.get_nonce(),
'chainId': Int(await self.rpc.call(chain_id_method),16),
'chainId': Int(await self.rpc.call('eth_chainId'),16),
'data': self.usr_contract_data,
}

View file

@ -643,21 +643,10 @@ class EthereumRPCClient(RPCClient,metaclass=aInitMeta):
'net_version',
'parity_chain',
'parity_chainId', # superseded by eth_chainId
'parity_chainStatus',
'parity_composeTransaction',
'parity_gasCeilTarget',
'parity_gasFloorTarget',
'parity_getBlockHeaderByNumber',
'parity_localTransactions',
'parity_minGasPrice',
'parity_mode',
'parity_netPeers',
'parity_nextNonce',
'parity_nodeKind',
'parity_nodeName',
'parity_pendingTransactions',
'parity_pendingTransactionsStats',
'parity_versionInfo',
)
class MoneroRPCClient(RPCClient):

View file

@ -58,7 +58,7 @@ class init_test:
async def eth(proto,backend):
rpc = await rpc_init(proto,backend)
do_msg(rpc)
await rpc.call('parity_versionInfo',timeout=300)
await rpc.call('eth_blockNumber',timeout=300)
def run_test(coin,auth):
proto = init_proto(coin,network=('mainnet','regtest')[coin=='eth']) # FIXME CoinDaemon's network handling broken