rpc: faster getblockstats using BlockUndo data

Using undo data for a block (rev?????.dat) we can retrieve value information about prevouts and calculate the final transaction fee (rate). This approach is about 80x faster, drops the requirement for -txindex, and works for all non-pruned blocks.
This commit is contained in:
Felix Weis
2019-05-10 08:21:52 -04:00
parent 08bd21a3bd
commit d20d756752
4 changed files with 174 additions and 187 deletions

View File

@@ -0,0 +1,3 @@
RPC changes
-----------
The `getblockstats` RPC is faster for fee calculation by using BlockUndo data. Also, `-txindex` is no longer required and `getblockstats` works for all non-pruned blocks.