aboutsummaryrefslogtreecommitdiff
path: root/src/arith_uint256.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-01-12 18:27:58 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-01-12 18:28:07 +0100
commit290ff5ef6d3886409e5e8688f7d28a4c8246c617 (patch)
tree33e599a4fc78e72ee14b1f9a33dd4363dca5d7e8 /src/arith_uint256.cpp
parent16781e1bc9f8ffc721ebea73434e0066957bc959 (diff)
parentb5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 (diff)
downloadbitcoin-290ff5ef6d3886409e5e8688f7d28a4c8246c617.tar.xz
Merge bitcoin/bitcoin#24041: util: Restore GetIntArg saturating behavior
b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 util: Restore GetIntArg saturating behavior (James O'Beirne) Pull request description: The new locale-independent atoi64 method introduced in #20452 parses large integer values higher than maximum representable value as 0 instead of the maximum value, which breaks backwards compatibility. This commit restores compatibility and adds test coverage for this case in terms of the related GetIntArg and strtoll functions. Specifically, command line or bitcoin.conf integer values greater than `9223372036854775807` (`2**63-1`) used to be parsed as `9223372036854775807` before #20452. Then #20452 caused them to be parsed as `0`. And after this PR they will be parsed as `9223372036854775807` again. This change is a stripped-down alternative version of #23841 by jamesob ACKs for top commit: jamesob: Github ACK https://github.com/bitcoin/bitcoin/pull/24041/commits/b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 vincenzopalazzo: ACK https://github.com/bitcoin/bitcoin/pull/24041/commits/b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 MarcoFalke: review ACK b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 🌘 Tree-SHA512: 4e8abdbabf3cf4713cf5a7c5169539159f359ab4109a4e7e644cc2e9b2b0c3c532fad9f6b772daf015e1c5340ce59280cd9a41f2730afda6099cbf636b7d23ae
Diffstat (limited to 'src/arith_uint256.cpp')
0 files changed, 0 insertions, 0 deletions