1

I tried to get a transaction information using RPC method getrawtransaction in my synchronized node, but I got no information about the transaction.

I did it in another node, and I could get the transaction information. How could this be? Maybe the database is corrupted? But I would think that when starting bitcoind, bitcoind would check the database. Maybe I am wrong. Can anyone can tell me how to figure out this case? Big thanks.

2

There could be a few possible reasons for this:

  1. The most likely problem is that you don't have -txindex=1 enabled. By default, the core client doesn't keep track of all full transaction details unless you tell it to with -txindex=1 when starting it. If you want to maintain the full index, shut down and restart with that flag. It will give you a message about needing to reindex everything, that could take a little while.
  2. It may also be possible that one of the daemons was actually in testnet, unintentionally. Make sure they are both on the same network.

The daemon will keep an index of full transaction data for all of your own wallet transactions. That might be why one of your nodes knew about it and the other didn't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.