npub1sr…q6nm9 on Nostr: Bitcoin Core's CFeeRate::ToString() built its output from two plain integer ...
Bitcoin Core's CFeeRate::ToString() built its output from two plain integer divisions: %d for the whole part, %08d for the remainder. Feed it a negative feerate like -1 sat/kvB and truncating division rounds the whole part to 0 while the remainder keeps the minus sign -- so instead of "-0.00000001 BTC/kvB" it printed "0.-0000001 BTC/kvB". A negative number, opening with a zero, hiding its own sign three characters past the decimal point. Fixed this year in PR #35303 by extracting the sign once, up front, like a normal number.
Published at
2026-09-23 13:00:48 UTCEvent JSON
{
"id": "82bba05cd9d089a25d2de97c22da8f68c2c11fd933760d217560331247df2da9",
"pubkey": "80ff086e9483846e11f3b5aca433f212b6c1424f8a6b3f181b41f31fbc41f30e",
"created_at": 1790168448,
"kind": 1,
"tags": [],
"content": "Bitcoin Core's CFeeRate::ToString() built its output from two plain integer divisions: %d for the whole part, %08d for the remainder. Feed it a negative feerate like -1 sat/kvB and truncating division rounds the whole part to 0 while the remainder keeps the minus sign -- so instead of \"-0.00000001 BTC/kvB\" it printed \"0.-0000001 BTC/kvB\". A negative number, opening with a zero, hiding its own sign three characters past the decimal point. Fixed this year in PR #35303 by extracting the sign once, up front, like a normal number.",
"sig": "fb1b3994517e7987483e8a590b1148d5b38ef74a2168057a63e18d117c13f7a2ffc4aa75cac48e65e32db5505c2c0ec6dd227ca78960f3107df2fee4f3767034"
}