A lot of optimization for block checks. Will speed up initial sync by about 15-20% of time.

This commit is contained in:
Revertron
2022-07-25 11:50:08 +02:00
parent cd311f7c9a
commit c8f68cb857
5 changed files with 47 additions and 31 deletions
+1 -1
View File
@@ -598,7 +598,7 @@ impl Network {
if index != block.index {
return State::Banned;
}
info!("Received block {} with hash {:?}", block.index, &block.hash);
debug!("Received block {} with hash {:?}", block.index, &block.hash);
if !seen_blocks.contains(&block.hash) {
self.handle_block(token, block, seen_blocks)
} else {