Skip to content

Commit 3f55de0

Browse files
committed
Add more detailed instruments to import_block
1 parent 4268ae5 commit 3f55de0

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

beacon_node/beacon_chain/src/beacon_chain.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3778,11 +3778,14 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
37783778

37793779
// TODO(das) record custody column available timestamp
37803780

3781-
// import
3782-
let chain = self.clone();
3783-
let block_root = self
3784-
.spawn_blocking_handle(
3781+
let block_root = {
3782+
// Capture the current span before moving into the blocking task
3783+
let current_span = tracing::Span::current();
3784+
let chain = self.clone();
3785+
self.spawn_blocking_handle(
37853786
move || {
3787+
// Enter the captured span in the blocking thread
3788+
let _guard = current_span.enter();
37863789
chain.import_block(
37873790
block,
37883791
block_root,
@@ -3794,7 +3797,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
37943797
},
37953798
"payload_verification_handle",
37963799
)
3797-
.await??;
3800+
.await??
3801+
};
37983802

37993803
// Remove block components from da_checker AFTER completing block import. Then we can assert
38003804
// the following invariant:

0 commit comments

Comments
 (0)