tx.online: send_with_node() -> rpc_send()
This commit is contained in:
parent
a4b1e1fefe
commit
4785f2cd36
5 changed files with 5 additions and 5 deletions
|
|
@ -50,7 +50,7 @@ class OnlineSigned(Signed, TxBase.OnlineSigned):
|
|||
msg(ret['reject-reason'])
|
||||
return False
|
||||
|
||||
async def send_with_node(self, txhex):
|
||||
async def rpc_send(self, txhex):
|
||||
try:
|
||||
return await self.rpc.call('sendrawtransaction', txhex)
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class OnlineSigned(Signed, TxBase.OnlineSigned):
|
|||
self.proto.coin))
|
||||
await self.status.display()
|
||||
|
||||
async def send_with_node(self, txhex):
|
||||
async def rpc_send(self, txhex):
|
||||
try:
|
||||
ret = await self.rpc.call('eth_sendRawTransaction', '0x' + txhex)
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class OnlineSigned(Signed, TxBase.OnlineSigned):
|
|||
async def send_checks(self):
|
||||
pass
|
||||
|
||||
async def send_with_node(self, txhex):
|
||||
async def rpc_send(self, txhex):
|
||||
res = self.rpc.tx_op(txhex, op='broadcast_tx_sync') # broadcast_tx_async
|
||||
if res['code'] == 0:
|
||||
return res['hash'].lower()
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class OnlineSigned(Completed, TxOnlineSigned):
|
|||
async def check_memoless_presend(self):
|
||||
return await super().check_memoless_presend(amt=self.send_amt)
|
||||
|
||||
async def send_with_node(self, txhex):
|
||||
async def rpc_send(self, txhex):
|
||||
op = xmrwallet_op('submit', self.cfg, self.infile, None, compat_call=True)
|
||||
await op.restart_wallet_daemon()
|
||||
self.compat_data = await op.main()
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class OnlineSigned(Signed):
|
|||
else:
|
||||
if idx != '':
|
||||
await asyncio.sleep(1)
|
||||
ret = await self.send_with_node(txhex)
|
||||
ret = await self.rpc_send(txhex)
|
||||
msg(f'Transaction sent: {coin_txid.hl()}')
|
||||
if ret != coin_txid:
|
||||
die('TxIDMismatch', f'txid mismatch (after sending) ({ret} != {coin_txid})')
|
||||
|
|
|
|||
Loading…
Reference in a new issue