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
Prior to this PR `memory_state` defined and implemented functionality for three different types, `Chain`, `NonFinalizedState`, and `QueuedBlocks`. Each of these components will need a fair number of unit tests, and I realized that as its currently organized it would be difficult to organize the tests or at a glance figure out which tests are testing which components.
This PR changes the organization of `memory_state` such that each component it exports is defined in its own module. In follow up PRs each module will get its own test module, which will focus exclusively on unit tests for the item defined there-in.
- [Tracking Issue](#1250)
Non-Finalized State Implementation
Chain
Chain
typeChain::push
--Chain
logic only is required to check this box, it's fine to stub out the full contextual verification checks for later.Chain::pop_root
Chain::pop_tip
Chain::fork
Bug Fixes
impl Ord for Chain
BTreeSet
orders the lowest item first (least work chain), and thatnext_back
is how you get the best chainTesting
Chain
operations are implemented correctlyChainSet
ChainSet
type (Implement MVP of NonFinalizedState and integrate it with the state service #1101)ChainSet::finalize
ChainSet::queue
ChainSet::process_queued
Bug Fixes
ChainSet::commit_block
ChainSet::best_chain_len
u32
likeDepth
, to avoid confusion with the best chain tip heightMemoryState
Chain
,ChainSet
to implementMemoryState
CommitBlock
QueuedBlocks
The text was updated successfully, but these errors were encountered: