mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 07:26:51 +00:00
`Ledger::walkLedger` returned `walkMapParallel`'s result directly when asked for a parallel walk, which skipped the transaction map walk and the missing-node logging that follow. `Application::loadOldLedger` is the only parallel caller, so `--load`, `--ledger`, `--ledgerfile` and `--replay` never checked a ledger's transaction map. The parallel result is now held in a local and combined with both maps' missing-node lists at the end. The early return could not simply be deleted: `walkMapParallel` reports a worker that cannot read the node store through its return value alone, so dropping the boolean would lose that answer while `missingNodes1` stays empty. This is an operational change for anyone using `--load` as a recovery step. A ledger whose transaction map is missing a node is now refused at startup rather than accepted. Refusing is the intent: the walk exists to decide whether every node of both maps is available, and until now it answered for only one of them. Two gtests in `src/tests/libxrpl/ledger/WalkLedger.cpp` build a ledger whose state map is complete and whose transaction map holds only its root, then check that both the parallel and the serial walk report it incomplete. A second case checks that a ledger with two complete maps passes on both paths. The first fails against the early return.