It returns per block statistics about several things. It should be easy to add more if people think of other things to add or remove some if I went too far (but once written, why not keep it? EDIT: answer: not to test or maintain them). The currently available options are: minfee,maxfee,totalfee,minfeerate,maxfeerate,avgfee,avgfeerate,txs,ins,outs (EDIT: see updated list in the rpc call documentation) For the x axis, one can use height or block.nTime (I guess I could add mediantime if there's interest [EDIT: nobody showed interest but I implemented mediantime nonetheless, in fact there's no distinction between x or y axis anymore, that's for the caller to judge]). To calculate fees, -txindex is required.
Partial backport of core PR10757 (commits 35e77a0, 4cbfb6a and 41d0476)
Depends on D3755.
The behavior of the getblockstats RPC has been changed from the PR:
- It does not include segwit related statistics
- The amounts are expressed in BCH instead of Satoshis. This make it consistent with other RPCs.