mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-14 03:23:12 +00:00
Background ledger acquisition reads and writes SHAMap::state_, ::full_, ::ledgerSeq_, and SHAMapInnerNode::fullBelowGen_ concurrently with the thread driving it, so all four are now std::atomic. finishFetch() withdraws full_ with an exchange behind a relaxed load, so exactly one reader thread reports a gap; ledgerSeq_ stays relaxed both ways since it's only a nodestore lookup hint. Ledger::setFull() sets each map's sequence before its full flag, so the release/exchange ordering makes the sequence visible to whichever thread's exchange wins the gap report.