mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 18:27:56 +00:00
Test syncing to all forks (#1544)
This commit is contained in:
committed by
Gav Wood
parent
1b0d90cdf6
commit
f38aa0d2de
@@ -222,6 +222,11 @@ impl<Block: BlockT> Blockchain<Block> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Get total number of blocks.
|
||||
pub fn blocks_count(&self) -> usize {
|
||||
self.storage.read().blocks.len()
|
||||
}
|
||||
|
||||
/// Compare this blockchain with another in-mem blockchain
|
||||
pub fn equals_to(&self, other: &Self) -> bool {
|
||||
self.canon_equals_to(other) && self.storage.read().blocks == other.storage.read().blocks
|
||||
|
||||
Reference in New Issue
Block a user