From b2b8ec0df2637d7995b6881fb5fcac34c317b341 Mon Sep 17 00:00:00 2001 From: Gustav Schauwecker Date: Thu, 15 Dec 2022 10:36:35 +0100 Subject: [PATCH] Remove requeuing of blocks with invalid signature This commit removes an unneeded behavior: Up until this commit, blocks with an invalid signature where requeued for lazy bootstrapping. This is not needed, because a block with an invalid signature will always be invalid and therefore doesn't need to be bootstrapped again. --- nano/node/blockprocessor.cpp | 11 ----------- nano/node/blockprocessor.hpp | 1 - 2 files changed, 12 deletions(-) diff --git a/nano/node/blockprocessor.cpp b/nano/node/blockprocessor.cpp index 746bd0beba..26dd7fcaad 100644 --- a/nano/node/blockprocessor.cpp +++ b/nano/node/blockprocessor.cpp @@ -206,10 +206,6 @@ void nano::block_processor::process_verified_state_blocks (std::dequehash ()); - node.bootstrap_initiator.lazy_requeue (hash_a, info_a.block->previous ()); -} - std::unique_ptr nano::collect_container_info (block_processor & block_processor, std::string const & name) { std::size_t blocks_count; diff --git a/nano/node/blockprocessor.hpp b/nano/node/blockprocessor.hpp index 16346a45c9..5c38614e26 100644 --- a/nano/node/blockprocessor.hpp +++ b/nano/node/blockprocessor.hpp @@ -66,7 +66,6 @@ class block_processor final void queue_unchecked (nano::write_transaction const &, nano::hash_or_account const &); void process_batch (nano::unique_lock &); void process_live (nano::transaction const &, nano::block_hash const &, std::shared_ptr const &, nano::process_return const &, nano::block_origin const = nano::block_origin::remote); - void requeue_invalid (nano::block_hash const &, nano::unchecked_info const &); void process_verified_state_blocks (std::deque &, std::vector const &, std::vector const &, std::vector const &); bool stopped{ false }; bool active{ false };