Skip to content

Commit d6ab73e

Browse files
authored
fix: print CanonicalBlockAdded logs after committed db (bnb-chain#115)
1 parent cdd7cea commit d6ab73e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • crates/consensus/beacon/src/engine

crates/consensus/beacon/src/engine/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,14 +1734,6 @@ where
17341734
Ok(status) => {
17351735
match status {
17361736
InsertPayloadOk::Inserted(BlockStatus::Valid(_)) => {
1737-
let elapsed = start.elapsed();
1738-
let event_block = Arc::new(block);
1739-
let event = BeaconConsensusEngineEvent::CanonicalBlockAdded(
1740-
event_block,
1741-
elapsed,
1742-
);
1743-
self.event_sender.notify(event);
1744-
17451737
// block is connected to the canonical chain and is valid.
17461738
// if it's not connected to current canonical head, the state root
17471739
// has not been validated.
@@ -1759,6 +1751,14 @@ where
17591751
)
17601752
}
17611753
}
1754+
1755+
let elapsed = start.elapsed();
1756+
let event_block = Arc::new(block);
1757+
let event = BeaconConsensusEngineEvent::CanonicalBlockAdded(
1758+
event_block,
1759+
elapsed,
1760+
);
1761+
self.event_sender.notify(event);
17621762
}
17631763
InsertPayloadOk::Inserted(BlockStatus::Disconnected {
17641764
head,

0 commit comments

Comments
 (0)