tx.online: send_with_node() -> rpc_send()

This commit is contained in:
The MMGen Project 2026-10-27 13:30:14 +00:00
commit 4785f2cd36
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
5 changed files with 5 additions and 5 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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()

View file

@ -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()

View file

@ -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})')