mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: add metric and trace for already executed blocks (#11406)
This commit is contained in:
@ -24,6 +24,8 @@ pub(crate) struct EngineApiMetrics {
|
||||
pub(crate) struct EngineMetrics {
|
||||
/// How many executed blocks are currently stored.
|
||||
pub(crate) executed_blocks: Gauge,
|
||||
/// How many already executed blocks were directly inserted into the tree.
|
||||
pub(crate) inserted_already_executed_blocks: Counter,
|
||||
/// The number of times the pipeline was run.
|
||||
pub(crate) pipeline_runs: Counter,
|
||||
/// The total count of forkchoice updated messages received.
|
||||
|
||||
@ -1191,7 +1191,9 @@ where
|
||||
FromEngine::Request(request) => {
|
||||
match request {
|
||||
EngineApiRequest::InsertExecutedBlock(block) => {
|
||||
debug!(target: "engine::tree", block=?block.block().num_hash(), "inserting already executed block");
|
||||
self.state.tree_state.insert_executed(block);
|
||||
self.metrics.engine.inserted_already_executed_blocks.increment(1);
|
||||
}
|
||||
EngineApiRequest::Beacon(request) => {
|
||||
match request {
|
||||
|
||||
Reference in New Issue
Block a user