feat: make nodetypes stateless and move evm to components (#7992)

This commit is contained in:
Matthias Seitz
2024-04-30 18:56:34 +02:00
committed by GitHub
parent 581682605c
commit d04d9556fa
20 changed files with 402 additions and 171 deletions

View File

@ -27,6 +27,15 @@ pub struct NoopBlockchainTree {
pub canon_state_notification_sender: Option<CanonStateNotificationSender>,
}
impl NoopBlockchainTree {
/// Create a new NoopBlockchainTree with a canon state notification sender.
pub fn with_canon_state_notifications(
canon_state_notification_sender: CanonStateNotificationSender,
) -> Self {
Self { canon_state_notification_sender: Some(canon_state_notification_sender) }
}
}
impl BlockchainTreeEngine for NoopBlockchainTree {
fn buffer_block(&self, _block: SealedBlockWithSenders) -> Result<(), InsertBlockError> {
Ok(())