Ethereum: Can’t get the tx with gettransaction or getrawtransaction methods

I see that you are experiencing problems with the recovery of transaction data in the Ethereum block chain.

Ethereum transaction recovery problem: You can’t obtain TX/RTX

Ethereum: Can't get the tx with gettransaction or getrawtransaction methods

methods

As Bitcoin-D runs, which is downloading previous blocks and tries to recover transaction information from another shell, I will guide it through the steps to solve this problem. Keep in mind that Ethereum has undergone significant changes since the last Bitcoin-D update, so it is possible that this problem has been solved in a recent version.

Symptom projection

When trying to use the getTransaction O’Getrawtransactionin a Shell, you will find an error message that indicates:

You cannot obtain TX with the 'Gettransaction' or 'Getrawtransaction' method

This is probably due to the fact that the Ethereum block chain has not yet been synchronized, which causes the transaction data recovery attempts to fail.

Solutions

Try the following steps to solve this problem:

  • Wait for the block chain to be synchronized : Make sure your system has reached a stable block chain snapshot runningBitcoind-Syncmode Fullin a Shell (for example, Bitcoin-D) Before trying transaction data in another shell (for example,another Conhelra ‘). This will help synchronize the block chain.

  • Update Bitcoin-D or use a different version : If you are using an earlier version of Bitcoin-D, consider updating a more recent version that admits the recovery of the Ethereum transaction. You can verify the updates executing Bitcoind version in a Shell and following the instructions to update its version.

  • Use the -txindex : in some cases, in some cases, you may need to use the-txyndex indicator when calling getTransaction O’Getrawtransaction. This flag tells Bitcoin-D to wait until all transactions have synchronized before trying to recover them.

Example of Code (Bitcoin-D 0.20.1)

Here is an example of how to update and solve the problem:

Bash

Update Bitcoin-D to version 0.21.2 or posterior

Bitcoind -update = 1 -Version

Wait for the block chain to synchronize

Bitcoin-D-Complete

Recover transaction data

Gettransaction tx_hash

Replacetx_hashwith the real hash of the transaction that is interested in recovering.

Additional notes

  • Make sure your system has a stable and sufficient bandwidth connection to download all transactions.

  • If you are experiencing persistent problems, consider restarting your Bitcoin-D process or update your entire network battery (for example,APT-GET UPDATE && APT-GET UPGRADEin Linux distributions).

Following these steps, I should be able to solve the problem of not being able to recover the transaction data using the methods 'Gettransaction or’ Getrawtransaction`. If you continue to experience difficulties, do not hesitate to provide more details about your environment and the Bitcoin-D version to get more help.