Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/chain-state/src/chain_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@ where
self.inner.finalized_block.borrow().clone()
}

/// Returns the canonical head of the chain.
/// Returns the `BlockNumHash` of the canonical head.
pub fn get_canonical_num_hash(&self) -> BlockNumHash {
self.inner.canonical_head.read().num_hash()
}

/// Returns the canonical head of the chain.
/// Returns the block number of the canonical head.
pub fn get_canonical_block_number(&self) -> BlockNumber {
self.inner.canonical_head_number.load(Ordering::Relaxed)
}

/// Returns the safe header of the chain.
/// Returns the `BlockNumHash` of the safe header.
pub fn get_safe_num_hash(&self) -> Option<BlockNumHash> {
self.inner.safe_block.borrow().as_ref().map(SealedHeader::num_hash)
}

/// Returns the finalized header of the chain.
/// Returns the `BlockNumHash` of the finalized header.
pub fn get_finalized_num_hash(&self) -> Option<BlockNumHash> {
self.inner.finalized_block.borrow().as_ref().map(SealedHeader::num_hash)
}
Expand Down
Loading