Skip to content

Commit

Permalink
chore(tree): make on_engine_message more concise (#10605)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rjected committed Aug 29, 2024
1 parent 4227055 commit ca5d3b0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,18 +919,15 @@ where
FromOrchestrator::BackfillSyncStarted => {
debug!(target: "consensus::engine", "received backfill sync started event");
self.backfill_sync_state = BackfillSyncState::Active;
Ok(())
}
FromOrchestrator::BackfillSyncFinished(ctrl) => {
self.on_backfill_sync_finished(ctrl)?;
Ok(())
}
},
FromEngine::Request(request) => {
match request {
EngineApiRequest::InsertExecutedBlock(block) => {
self.state.tree_state.insert_executed(block);
Ok(())
}
EngineApiRequest::Beacon(request) => {
match request {
Expand Down Expand Up @@ -958,7 +955,6 @@ where
{
error!("Failed to send event: {err:?}");
}
Ok(())
}
BeaconEngineMessage::NewPayload { payload, cancun_fields, tx } => {
let output = self.on_new_payload(payload, cancun_fields);
Expand All @@ -969,14 +965,12 @@ where
})) {
error!("Failed to send event: {err:?}");
}
Ok(())
}
BeaconEngineMessage::TransitionConfigurationExchanged => {
// triggering this hook will record that we received a request from
// the CL
self.canonical_in_memory_state
.on_transition_configuration_exchanged();
Ok(())
}
}
}
Expand All @@ -986,9 +980,9 @@ where
if let Some(event) = self.on_downloaded(blocks)? {
self.on_tree_event(event);
}
Ok(())
}
}
Ok(())
}

/// Invoked if the backfill sync has finished to target.
Expand Down

0 comments on commit ca5d3b0

Please sign in to comment.