chore(tree): first block naming (#3009)

This commit is contained in:
Roman Krasiuk
2023-06-06 12:32:06 +03:00
committed by GitHub
parent 171166e84a
commit b3bd98c370

View File

@ -82,8 +82,8 @@ impl Chain {
/// Get the block at which this chain forked. /// Get the block at which this chain forked.
#[track_caller] #[track_caller]
pub fn fork_block(&self) -> ForkBlock { pub fn fork_block(&self) -> ForkBlock {
let tip = self.first(); let first = self.first();
ForkBlock { number: tip.number.saturating_sub(1), hash: tip.parent_hash } ForkBlock { number: first.number.saturating_sub(1), hash: first.parent_hash }
} }
/// Get the block number at which this chain forked. /// Get the block number at which this chain forked.