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
This commit is contained in:
MarcoFalke
2018-08-13 07:18:00 -04:00
5 changed files with 162 additions and 12 deletions

View File

@ -27,7 +27,7 @@ class GetblockstatsTest(BitcoinTestFramework):
'maxfee',
'maxfeerate',
'medianfee',
'medianfeerate',
'feerate_percentiles',
'minfee',
'minfeerate',
'totalfee',