This PR adds a mempool statistics to the “debug” window. The diagram is heavy inspired by Jochen Hoenicke’s webversion (Thanks @jhoenicke for that).
macOS:
Ubuntu:
The approach is it to collect the fees also when the mempool chart or the node window is not open (collect it from the start of the application). Clicking on the fee-range color square highlights the fee group over time.
To keep the scope minimal:
- flexible timeframe is out of scope (can be added later)
See also https://github.com/bitcoin/bitcoin/pull/8550 (an initial attempt, different concept).
TODO:
- Make it non HiDPI compatible (linux/win/etc.).
- Analyze memory consumption (should not be too bad)
- Optimize performance
- Try to make fee ranges dynamic



It would be ideal if the functionality of the previous graph and the new could be combined. e.g. allow different durations to be shown (from 3 hours, to 2 weeks), have one line for tx count, but show the fee rates within the memory usage graph. The scale (tx count and MB usage) could both be shown on the right, with the fee-rates shown on the left. Change the colours slightly so that the minfeerate and tx count are still clearly visible if plotted over the memusage/feerate. Oh, and ideally the window could be a separate window, rather than as a tab on the debug window.
The functionality of clicking on a fee range and it displaying the number of transactions seems a bit off. In this example it’s saying there are over 1,000,000 transactions in the 30-40 satoshi range, yet the vertical axis only goes up to 20,000 tx.
Thinking it might be nice if the vertical axis scaled like it did on the old graph so that more detail can be seen…