marcofleon 854a6d5a9a validation: fix UB in LoadChainTip
The removal of the chain tip from setBlockIndexCandidates was
happening after nSequenceId was modified. Since the set uses
nSequenceId as a sort key, modifying it while the element is in the
set is undefined behavior, which can cause the erase to fail.

With assumeutxo, a second form of UB exists: two chainstates each
have their own candidate set, but share the same CBlockIndex
objects. Calling LoadChainTip on one chainstate mutates nSequenceIds
that are also in the other chainstate's set.

Fix by populating setBlockIndexCandidates after all changes to
nSequenceId.
2026-03-04 19:39:20 +00:00
..
2026-02-05 13:46:14 +00:00
2026-02-03 11:19:01 +01:00
2026-03-04 19:39:20 +00:00
2026-03-04 19:39:20 +00:00
2025-05-19 16:40:33 +01:00
2026-02-17 21:40:46 +05:30
2025-09-03 11:23:30 +01:00
2025-05-19 16:40:33 +01:00
2025-09-30 11:06:43 -07:00
2026-01-22 10:35:14 -05:00
2025-11-14 01:17:38 +02:00
2026-02-02 17:22:31 +00:00