diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-03-26 20:23:49 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-03-26 20:25:55 -0400 |
commit | 0dc6218c7911762027f7839f54b5d27845531255 (patch) | |
tree | bb036188d36b805d0aaa74440ff7df0dfe63c0d8 /build_msvc/bitcoin_config.h | |
parent | 7f9dedb22dcd9550ca525c0e35fec38b2d59e029 (diff) | |
parent | 100213c5c29ebd7bd50aa885e54594ae10bf87a4 (diff) | |
download | bitcoin-0dc6218c7911762027f7839f54b5d27845531255.tar.xz |
Merge #18270: util: Fail to parse whitespace-only strings in ParseMoney(...) (instead of parsing as zero)
100213c5c29ebd7bd50aa885e54594ae10bf87a4 util: Fail to parse space-only strings in ParseMoney(...) (instead of parsing as zero) (practicalswift)
Pull request description:
Fail to parse whitespace-only strings in `ParseMoney(...)` (instead of parsing as `0`).
This is a follow-up to #18225 ("util: Fail to parse empty string in `ParseMoney`") which made `ParseMoney("")` fail instead of parsing as `0`.
Context: https://github.com/bitcoin/bitcoin/pull/18225#issuecomment-592994765
Current non-test call sites:
```
$ git grep ParseMoney ":(exclude)src/test/"
src/bitcoin-tx.cpp: if (!ParseMoney(strValue, value))
src/init.cpp: if (!ParseMoney(gArgs.GetArg("-incrementalrelayfee", ""), n))
src/init.cpp: if (!ParseMoney(gArgs.GetArg("-minrelaytxfee", ""), n)) {
src/init.cpp: if (!ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n))
src/init.cpp: if (!ParseMoney(gArgs.GetArg("-dustrelayfee", ""), n))
src/miner.cpp: if (gArgs.IsArgSet("-blockmintxfee") && ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) {
src/util/moneystr.cpp:bool ParseMoney(const std::string& str, CAmount& nRet)
src/util/moneystr.h:NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet);
src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-mintxfee", ""), n) || 0 == n) {
src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) {
src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-discardfee", ""), nFeePerK)) {
src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-paytxfee", ""), nFeePerK)) {
src/wallet/wallet.cpp: if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee)) {
```
ACKs for top commit:
Empact:
ACK https://github.com/bitcoin/bitcoin/pull/18270/commits/100213c5c29ebd7bd50aa885e54594ae10bf87a4
sipa:
ACK 100213c5c29ebd7bd50aa885e54594ae10bf87a4
theStack:
ACK https://github.com/bitcoin/bitcoin/commit/100213c5c29ebd7bd50aa885e54594ae10bf87a4
Tree-SHA512: cadfb1ac8276cf54736c3444705f2650e7a08023673aedc729fabe751ae80f6c490fc0945ee38dbfd02c95e4d9853d1e4c84f5d3c310f44eaf3585afec8a4c22
Diffstat (limited to 'build_msvc/bitcoin_config.h')
0 files changed, 0 insertions, 0 deletions