Skip to content

Commit

Permalink
Do not notify consensus about historical blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
fizyk20 committed Sep 19, 2024
1 parent e6456b7 commit d14054d
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions node/src/reactor/main_reactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
}
Expand Down

0 comments on commit d14054d

Please sign in to comment.