From 3bffc6990eebdb68a196ecdd4632a12f97089593 Mon Sep 17 00:00:00 2001 From: Gustav Schauwecker Date: Wed, 15 Feb 2023 11:03:08 +0100 Subject: [PATCH] Remove requeuing of blocks with invalid signature (#4130) 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 746bd0beb..26dd7fcaa 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 16346a45c..5c38614e2 100644 --- a/nano/node/blockprocessor.hpp +++ b/nano/node/blockprocessor.hpp @@ -66,7 +66,6 @@ private: 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 };