mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 00:58:11 -05:00
chore: improve tree traces (#2781)
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com> Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
@@ -336,7 +336,7 @@ impl<DB: Database, C: Consensus, EF: ExecutorFactory> BlockchainTree<DB, C, EF>
|
||||
parent: BlockNumHash,
|
||||
) -> Result<BlockStatus, InsertBlockError> {
|
||||
let block_num_hash = block.num_hash();
|
||||
debug!(target: "blockchain_tree", ?parent, "Appending block to canonical chain");
|
||||
debug!(target: "blockchain_tree", head = ?block_num_hash.hash, ?parent, "Appending block to canonical chain");
|
||||
// create new chain that points to that block
|
||||
//return self.fork_canonical_chain(block.clone());
|
||||
// TODO save pending block to database
|
||||
@@ -742,6 +742,8 @@ impl<DB: Database, C: Consensus, EF: ExecutorFactory> BlockchainTree<DB, C, EF>
|
||||
|
||||
/// Connect unconnected,buffered blocks if the new block closes a gap.
|
||||
fn try_connect_buffered_blocks(&mut self, new_block: BlockNumHash) {
|
||||
trace!(target: "blockchain_tree", ?new_block, "try_connect_buffered_blocks");
|
||||
|
||||
let include_blocks = self.buffered_blocks.take_all_children(new_block);
|
||||
// insert block children
|
||||
for block in include_blocks.into_iter() {
|
||||
|
||||
@@ -412,7 +412,7 @@ where
|
||||
self.update_canon_chain(&state)?;
|
||||
}
|
||||
self.listeners.notify(BeaconConsensusEngineEvent::ForkchoiceUpdated(state));
|
||||
trace!(target: "consensus::engine", ?state, status = ?payload_response, "Returning forkchoice status");
|
||||
trace!(target: "consensus::engine", status = ?payload_response, ?state, "Returning forkchoice status ");
|
||||
return Ok(payload_response)
|
||||
}
|
||||
|
||||
@@ -438,7 +438,8 @@ where
|
||||
};
|
||||
|
||||
self.listeners.notify(BeaconConsensusEngineEvent::ForkchoiceUpdated(state));
|
||||
trace!(target: "consensus::engine", ?state, ?status, "Returning forkchoice status");
|
||||
|
||||
trace!(target: "consensus::engine", ?status, ?state, "Returning forkchoice status");
|
||||
Ok(OnForkChoiceUpdated::valid(status))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user