File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
beacon_node/beacon_chain/src Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff 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:
You can’t perform that action at this time.
0 commit comments