Commit graph

10 commits

Author SHA1 Message Date
Felix Weis
d20d756752 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.
2019-05-10 08:33:14 -04:00
MarcoFalke
faa7cdf764
scripted-diff: Update copyright in ./test
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./test/
-END VERIFY SCRIPT-
2019-03-02 10:58:35 -05:00
MarcoFalke
fa4ce7038d
rpc: Actually throw help when passed invalid number of params 2019-02-20 13:34:16 -05:00
João Barbosa
3be209d103 rpc: Always throw in getblockstats if -txindex is required
Previously blocks with only the coinbase transaction didn't cause
the RPC error even if the requested stats required -txindex and
it wasn't enabled.
2018-10-19 15:28:41 +01:00
MarcoFalke
a9c56b6634
Merge #13918: rpc: Replace median fee rate with feerate percentiles in getblockstats
4b7091a842 Replace median fee rate with feerate percentiles (Marcin Jachymiak)

Pull request description:

  Currently,  the `medianfeerate` statistic is calculated from the feerate of the middle transaction of a list of transactions sorted by feerate.

  This PR instead uses the value of the 50th percentile weight unit in the block, and also calculates the feerate at the 10th, 25th, 75th, and 90th percentiles.  This more accurately corresponds with what is generally meant by median feerate.

Tree-SHA512: 59255e243df90d7afbe69839408c58c9723884b8ab82c66dc24a769e89c6d539db1905374a3f025ff28272fb25a0b90e92d8101103e39a6d9c0d60423a596714
2018-08-13 07:18:25 -04:00
Kvaciral
5654efb187 Ported usage of deprecated optparse module to argparse module 2018-08-12 00:23:53 +02:00
Marcin Jachymiak
4b7091a842 Replace median fee rate with feerate percentiles
Removes medianfeerate result from getblockstats.
Adds feerate_percentiles which give the feerate of the 10th, 25th, 50th,
75th, and 90th percentile weight unit in the block.
2018-08-11 15:00:17 -04:00
DrahtBot
eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
practicalswift
634bd97001 Explicitly specify encoding when opening text files in Python code 2018-06-12 21:34:52 +02:00
Jorge Timón
4cbfb6aad9
Tests: Test new getblockstats RPC
Includes commit from Anthony Towns @ajtowns:

Tests: Save and load block and corresponding expected statistics
2018-05-22 23:26:33 +02:00