From d14054d73872414e8ee4a4b16551b210f620a83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kami=C5=84ski?= Date: Thu, 19 Sep 2024 19:10:32 +0300 Subject: [PATCH] Do not notify consensus about historical blocks --- node/src/reactor/main_reactor.rs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/node/src/reactor/main_reactor.rs b/node/src/reactor/main_reactor.rs index b1893acbf9..b18b6fb784 100644 --- a/node/src/reactor/main_reactor.rs +++ b/node/src/reactor/main_reactor.rs @@ -1553,21 +1553,9 @@ impl MainReactor { ), )); } - MetaBlock::Historical(historical_meta_block) => { - // Header type is the same for now so we can use the same `BlockAdded` event; - // When the header will be versioned, a new event will be needed for the - // consensus component. - effects.extend(reactor::wrap_effects( - MainEvent::Consensus, - self.consensus.handle_event( - effect_builder, - rng, - consensus::Event::BlockAdded { - header: Box::new(historical_meta_block.block.clone_header()), - header_hash: *historical_meta_block.block.hash(), - }, - ), - )); + MetaBlock::Historical(_historical_meta_block) => { + // Historical meta blocks aren't of interest to consensus - consensus only + // cares about new blocks. Hence, we can just do nothing here. } } }