util: ParseByteUnits - Parse a string with suffix unit [k|K|m|M|g|G|t|T]

A convenience utility for human readable arguments/config e.g. -maxuploadtarget=500g
This commit is contained in:
Douglas Chimento
2021-11-17 12:47:30 +02:00
parent 94db963de5
commit 21b58f430f
6 changed files with 138 additions and 4 deletions

View File

@@ -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
-------------------