mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 23:38:08 +00:00
`visitNodes` discarded what the visitor returned for the root, so a visitor that stopped there had its answer ignored and the whole tree was walked anyway. The online-delete copy loop returns false from `copyNode` on a health abort, so an abort at the root was silently overridden. The root's answer is now honoured, and the walk reports itself complete, since the root was readable. The `@return` wording on `visitNodes` and `visitLeaves` claimed a true result meant every node was visited "including when the visitor stopped the walk early", which contradicts itself. Both now say what the result measures: whether every node the walk reached was readable, with early termination called out as a separate thing. The per-node missing-child log drops from info to debug. It fires once per unreadable child and an incomplete sync reaches it often, while the callers that act on the result already log the aggregate at a level an operator reads. `processReplayDeltaRequest` now answers `reNO_NODE` rather than `reNO_LEDGER` and clears the header it had already set. The ledger is present, so the missing nodes are what the error should name, and an error reply should not carry a partial payload. Both codes charge the requester the same fee, and the requester only checks whether an error is set, so this changes no peer's behaviour. Three tests cover the contract the reviewers asked about: an early stop on a complete map still reports complete, a stop at the root visits nothing further, and a map holding only its root reports incomplete after visiting one node.