Files
rippled/include
Bart 7050ca96b5 fix: Refuse to make an invalid SHAMap or Ledger immutable
SHAMap::setImmutable() now returns [[nodiscard]] bool and refuses a map
already proven impossible; every state change goes through trySetState(),
whose compare-exchange can't leave Invalid however it interleaves with
another thread's. Ledger::setImmutable()/setAccepted() do the same one
level up, checking mapsValid() before touching anything and settling both
maps independently so neither is left mid-sync because the other refused.

All fourteen call sites now branch on the result. The two genesis paths
and buildLedgerImpl() call logicError(), since consensus can't tolerate an
invalid ledger; the load paths return early instead; InboundLedger and
TransactionAcquire withdraw complete_ alongside the failure, since for
them a refusal is an outcome a peer can produce.
2026-08-24 11:12:50 -04:00
..