mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 23:38:08 +00:00
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.