You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename various close things to apply, add comment. (#4647)
This does a few things:
1. Adds a big block comment to LedgerManager.h explaining the flow of
ledgers through LedgerApplyManager and LedgerManager in more detail, as
well as showing/describing the threading behaviour (assuming parallel
apply).
2. Renames various bits named "close" to "apply" when they are
things-done-by-the-apply-thread or
variables-touched-by-the-apply-thread, in order to more clearly
differentiate "close" stuff (on main thread, tracking LCL) from "apply"
stuff (on apply thread, possibly ahead of LCL).
3. Partitions state between two structs in the LM, one for apply-state
and one for LCL state.
4. Recycles the output-from-the-apply-phase struct to _store_ the LCL
state, since they had the same content.
5. Moves the ledger metrics into a sub-struct just so they're a little
less cluttered.
6. Renames a few of the later-stages-of-apply/close from generic terms
like `ledgerApplied` to more specific terms like
`sealLedgerTxnAndStoreInBucketsAndDB`. It's a mouthful but you at least
don't have to go re-read the function body each time you see a call to
remember what it does.
The change is _nearly_ a no-op. Functionality-wise I only added two
asserts that ought to (and appear to) always be true.
0 commit comments