Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 6aaf6e5

Browse files
committed
f Account for BestBlock dropping accessor methods
1 parent 5642ca0 commit 6aaf6e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/manager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,9 @@ where
583583
) {
584584
if let Some(best_block) = &self.best_block {
585585
let best_block = best_block.read().unwrap();
586-
assert_eq!(best_block.block_hash(), header.prev_blockhash,
586+
assert_eq!(best_block.block_hash, header.prev_blockhash,
587587
"Blocks must be connected in chain-order - the connected header must build on the last connected header");
588-
assert_eq!(best_block.height(), height - 1,
588+
assert_eq!(best_block.height, height - 1,
589589
"Blocks must be connected in chain-order - the connected block height must be one greater than the previous height");
590590
}
591591

@@ -597,9 +597,9 @@ where
597597
let new_height = height - 1;
598598
if let Some(best_block) = &self.best_block {
599599
let mut best_block = best_block.write().unwrap();
600-
assert_eq!(best_block.block_hash(), header.block_hash(),
600+
assert_eq!(best_block.block_hash, header.block_hash(),
601601
"Blocks must be disconnected in chain-order - the disconnected header must be the last connected header");
602-
assert_eq!(best_block.height(), height,
602+
assert_eq!(best_block.height, height,
603603
"Blocks must be disconnected in chain-order - the disconnected block must have the correct height");
604604
*best_block = BestBlock::new(header.prev_blockhash, new_height)
605605
}

0 commit comments

Comments
 (0)