1

I am very new to bitcoin but finally managed to get it all installed and compiled. I am following along with Mastering Bitcoin.

There is an example to use getrawtransaction as follows:

bitcoin-cli getrawtransaction 0627052b6f28912f2703066a912ea577f2ce4da4caa5a5fbd8a57286c345c2f2.

I get the error no such mempool transaction. Using block explorer, this transaction appears in block 277316.

I noticed that when I run bitcoin-cli getblockcount, I only get 180024, which was mined in 2012. Why am I getting such old data?

1 Answer 1

3

I get the error no such mempool transaction. Using block explorer, this transaction appears in block 277316.

Unless you're running with the -txindex command line option, or a txindex=1 line in your bitcoin.conf file, getrawtransaction only works for mempool transactions (not transactions already in the blockchain).

I noticed that when I run bitcoin-cli getblockcount, I only get 180024, which was mined in 2012. Why am I getting such old data?

Presumably your bitcoind is still synchronizing with the network. This may take hours (or even days, on slow hardware).

2
  • Wow cool a core dev answering my question! Thanks Pieter. You were right about the sync as it is now much higher. What do you mean by "only forks"? Still pretty new to this. Sep 23, 2017 at 5:07
  • Oops, that was typo. Fixed. Sep 23, 2017 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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