1
I got a block and asked for the data in its first transaction and that generated an error. The following is from the console tab in the Debug window:
10:52:52 getblock 000000000030bfd22ed67169b6bbf9ba994618fa9840642d395b56134f15176c
10:52:52
{
"hash": "000000000030bfd22ed67169b6bbf9ba994618fa9840642d395b56134f15176c",
"confirmations": 332460,
"size": 216,
"height": 81626,
"version": 1,
"merkleroot": "1ebda57ace225010d23d72619dbda5ee250dc4536f7c3428a9a419f06438ca54",
"tx": [
"1ebda57ace225010d23d72619dbda5ee250dc4536f7c3428a9a419f06438ca54"
],
"time": 1285297753,
"mediantime": 1285295165,
"nonce": 71992579,
"bits": "1b4766ed",
"difficulty": 917.8307413015116,
"chainwork": "00000000000000000000000000000000000000000000000000650ba70ddba016",
"previousblockhash": "00000000001272fc0e0cfa9d08d854cfac681a939dccc21aecd9f7074fb0df2b",
"nextblockhash": "00000000001bd5ac7329097b9888628c33c7adeecfc6e46f74fbab006f4c2127"
}
10:53:42 getrawtransaction 1ebda57ace225010d23d72619dbda5ee250dc4536f7c3428a9a419f06438ca54
10:53:42 No information available about transaction (code -5)
This happens in Bitcoin Classic and in Bitcoin Core. I don't have a bitcoin.conf file in the folder where bitcoin-qt.exe lives, but I do have one where the chainstate and blocks folders are located. It has five lines in it and each one starts with "addnode".
I only do this to myself: Dave, RTFM! `getrawtransaction "txid" ( verbose )
NOTE: By default this function only works sometimes. This is when the tx is in the mempool or there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option.` – Dave Scotese – 2016-05-31T18:40:38.457