GUI: Display mempool total tx size alongside memory usage in Node window
This answers the ultimate question of life, the universe, and everything: does the mempool fit in the next block?
Also:
- Total tx size and memory usage are now formatted with
GUIUtil::formatBytes
, rather than separate formatting logic. -
GUIUtil::formatBytes
now displays one decimal when using megabytes (previously no decimals). - Includes bugfix:
GUIUtil::formatBytes
now uses the appropriate decimal separator for the current language, instead of always a dot (bug existed since !697 (merged) which introduced two decimals when using gigabytes). - Created a unit test for
GUIUtil::formatBytes
.
Test plan: try the GUI (open Node window in different languages with
different decimal points), and ninja check
Edited by Calin: Note that this MR also affects the way that the bytes are formatted in the following places:
- Peers tab in the Node window
- Network Traffic tab in the Node window
See screenshots:
Edited by Calin Culianu