Using block undo data (like in #14802) we can now show fee information for each transaction in a block without the need for additional -txindex
and/or a ton of costly lookups. For a start we’ll add transaction fee information to getblock
verbosity level 2. This comes at a negligible speed penalty (<1%). Optimally, we add a “prevout” KV to each input spent, displaying additional information like value
, scriptPubKey
and height
for each input spent. Because this involves calculating addresses it is a lot more costly (~ 22% slower) so new verbosity level 3 is introduced.
0src/bitcoin-cli getblock 00000000000000000007fce39a80dc9110fe8709ee504c01e1f04f1f59be7bbf 2
1...
2 "fees": 0.00124850,
3...