mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-13 00:57:24 +02:00
f3bf63ec4fkernel: acquire coinstats cursor and block info atomically (w0xlt)5e77072fa6rpc: fix race condition in gettxoutsetinfo (w0xlt) Pull request description: Fixes #34263 A `CHECK_NONFATAL` assertion failure could occur in `gettxoutsetinfo` when a new block was connected between capturing `pindex` and validating it in `GetUTXOStats()`. The fix removes the early `pindex` capture since `ComputeUTXOStats()` independently fetches the current best block under lock. The response now uses `stats.hashBlock` and `stats.nHeight` (the actual computed values) instead of the potentially stale `pindex`. ACKs for top commit: sedited: ACKf3bf63ec4ffjahr: utACKf3bf63ec4frkrux: Concept ACKf3bf63ec4ffor removal of the race condition. Tree-SHA512: c2d5cd5a1b4b4f1c22023c03970fea400a0b78005fa3d09d6567255615ab461c01b584d8a158651ee08769ec86fc4a1200f640ad58fdaa4879c335d90c891f6a