fix: perform forkchoice update consistency checks (#3730)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Dan Cline
2023-07-12 10:12:33 -04:00
committed by GitHub
parent 6799fc3600
commit 99240906a8
4 changed files with 119 additions and 5 deletions

View File

@ -217,6 +217,9 @@ pub trait BlockchainTreeViewer: Send + Sync {
/// Note: this could be the given `parent_hash` if it's already canonical.
fn find_canonical_ancestor(&self, parent_hash: BlockHash) -> Option<BlockHash>;
/// Return whether or not the block is known and in the canonical chain.
fn is_canonical(&self, hash: BlockHash) -> Result<bool, Error>;
/// Given the hash of a block, this checks the buffered blocks for the lowest ancestor in the
/// buffer.
///