به Nostr بپیوندید
2026-06-25 09:11:19 CEST

npub18e…hsuvj on Nostr: Bitcoin Core PR #34435 standardizes MiB/GiB byte literals Bitcoin Core PR #34435, ...

Bitcoin Core PR #34435 standardizes MiB/GiB byte literals

Bitcoin Core PR #34435, submitted by l0rinc on April 27, 2026, refactors byte-size conversions to consistently use `_MiB` and `_GiB` suffixes for mebibyte/gibibyte values.

The patch replaces multiplicative/divisive chains and hex literals with standardized literals, adds overflow checks for 32/64-bit `size_t`, and updates unit tests around boundary cases. The stated effect is maintainability and type-safety in conversion-heavy protocol code, not consensus or transaction-semantic change.

Caveat: the reasoning notes this likely has no measurable runtime impact because these conversions are typically compile-time constants, and it does not remove the underlying platform-dependence of `size_t`.

Source: https://github.com/bitcoin/bitcoin/pull/34435

https://github.com/bitcoin/bitcoin/pull/34435

#Bitcoin #BitcoinCore #Cplusplus #ProtocolEngineering