mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
util: Add PruneGBtoMiB() function
This commit does not change behavior.
This commit is contained in:
@@ -22,6 +22,11 @@ static constexpr unsigned short DEFAULT_GUI_PROXY_PORT = 9050;
|
||||
*/
|
||||
static inline int PruneMiBtoGB(int64_t mib) { return (mib * 1024 * 1024 + GB_BYTES - 1) / GB_BYTES; }
|
||||
|
||||
/**
|
||||
* Convert displayed prune target GB to configured MiB. Round down so roundtrip GB -> MiB -> GB conversion is stable.
|
||||
*/
|
||||
static inline int64_t PruneGBtoMiB(int gb) { return gb * GB_BYTES / 1024 / 1024; }
|
||||
|
||||
/** Interface from Qt to configuration data structure for Bitcoin client.
|
||||
To Qt, the options are presented as a list with the different options
|
||||
laid out vertically.
|
||||
|
||||
Reference in New Issue
Block a user