TransWikia.com

How to reliably send transaction via web3j while connection is poor?

Ethereum Asked by Roman Chumachenko on November 10, 2021

I use Transfer.sendFunds(Web3j, Credentials, BigDecimal, Convert.Unit) to transfer money. Usually I convert it to flowable. Flowable/RemoteCall completes when transaction is included in block (correct me if I am wrong). So my question actually can be split to two:

  • does web3j handle cases when I started transaction and then went offline?
  • and if so how can I get transaction hash?

One Answer

Transaction hash is created before the transaction is broadcasted. Transaction hash, as the name says, is just all hashed data for a signed transaction.

Because Ethereum transactions have nonce parameter you can safely re-broadcast any signed transaction as many times as you want. Miners will mine transactions only in the order of one step nonce increases, nonce = 1, nonce = 2, etc.

Answered by Mikko Ohtamaa on November 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP