add manual_assert clippy lint (#8578)

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
This commit is contained in:
Thomas Coratger
2024-06-04 10:27:40 +02:00
committed by GitHub
parent 56859b4172
commit 4c6e5be876
8 changed files with 25 additions and 32 deletions

View File

@ -45,9 +45,10 @@ impl BlockchainTreeConfig {
num_of_additional_canonical_block_hashes: u64,
max_unconnected_blocks: u32,
) -> Self {
if max_reorg_depth > max_blocks_in_chain {
panic!("Side chain size should be more than finalization window");
}
assert!(
max_reorg_depth <= max_blocks_in_chain,
"Side chain size should be more than finalization window"
);
Self {
max_blocks_in_chain,
max_reorg_depth,