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/34435https://github.com/bitcoin/bitcoin/pull/34435#Bitcoin #BitcoinCore #Cplusplus #ProtocolEngineering
Published at
2026-06-25 09:11:19 CESTEvent JSON
{
"id": "03e6b385a70b4ea1ef539db38135e1dfafc724fb21fcb1a1c3f649cd18fc98e3",
"pubkey": "3e6a037c63e7c726f4ed51a1898aa2bb442913ef4ba729f0d27392ab3a57b3c1",
"created_at": 1782371479,
"kind": 1,
"tags": [
[
"t",
"bitcoin"
],
[
"t",
"bitcoincore"
],
[
"t",
"cplusplus"
],
[
"t",
"protocolengineering"
]
],
"content": "Bitcoin Core PR #34435 standardizes MiB/GiB byte literals\n\nBitcoin 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.\n\nThe 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.\n\nCaveat: 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`.\n\nSource: https://github.com/bitcoin/bitcoin/pull/34435\n\nhttps://github.com/bitcoin/bitcoin/pull/34435\n\n#Bitcoin #BitcoinCore #Cplusplus #ProtocolEngineering",
"sig": "ee1ac72bf95b3a810457478da85daaf87961b605e8d3c1dc15ce23b4fa3d5a5c3eb3b7744d19c3c4d8031a3132179815042d4d9b413f4cafdeb85208a0888002"
}