Mirobit / bitcoin-node-manager

:bar_chart: Lightweight dashboard and control system for bitcoin nodes
MIT License
122 stars 62 forks source link

Incorrect use of getrawtransaction() on function createBlocksContent(). #37

Closed iker190 closed 3 years ago

iker190 commented 3 years ago

Blocks tab fails because function getrawtransaction() is missing a third argument "blockhash". Without this argument it just looks in the mempool for the txid not in the block.

Changing the line 116 on Content.php should fix the issue: $coinbaseTx = $bitcoind->getrawtransaction($block["tx"][0], 1); to $coinbaseTx = $bitcoind->getrawtransaction($block["tx"][0], 1, $block["hash"]);

Thank you for your work!

Mirobit commented 3 years ago

Thanks for the tip. This way BNM can get ride of the txindex=1 requirement. Don't know why I didn't see this sooner. Improved in 4397005.