mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 20:23:35 +01:00
Merge bitcoin/bitcoin#23249: util: ParseByteUnits - Parse a string with suffix unit
21b58f430futil: ParseByteUnits - Parse a string with suffix unit [k|K|m|M|g|G|t|T] (Douglas Chimento) Pull request description: A convenience utility for parsing human readable strings sizes e.g. `500G` is `500 * 1 << 30` The argument/setting `maxuploadtarget` now accept human readable byte units `[k|K|m|M|g|G||t|T]` This change backward compatible, defaults to `M` if no unit specified. ACKs for top commit: vasild: ACK21b58f430fryanofsky: Code review ACK21b58f430f. Only changes since last review are dropping optional has_value call, fixing comment punctuation, squashing commits. Tree-SHA512: c9b85acc0f77c847a0290b27ac5dc586ecc078110cf133063140576a04c11aa9c553159b9b4993488edcf6e60db6837de7c83b2964639bc21e8ffa4d455a5eb7
This commit is contained in:
@@ -127,6 +127,10 @@ Updated settings
|
||||
mean `-persistmempool=1`. Passing `-persistmempool=0`, `-persistmempool=1`
|
||||
and `-nopersistmempool` is unaffected. (#23061)
|
||||
|
||||
- `-maxuploadtarget` now allows human readable byte units [k|K|m|M|g|G|t|T].
|
||||
E.g. `-maxuploadtarget=500g`. No whitespace, +- or fractions allowed.
|
||||
Default is `M` if no suffix provided. (#23249)
|
||||
|
||||
Tools and Utilities
|
||||
-------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user