@@ -40,14 +40,19 @@ macro_rules! spawn_provider_send {
4040
4141/// Helper macro to check if the slot is still valid before submitting a block.
4242macro_rules! check_slot_still_valid {
43- ( $self: expr, $initial_slot: expr) => {
43+ ( $self: expr, $initial_slot: expr, $span : expr ) => {
4444 if !$self. slot_still_valid( $initial_slot) {
45- debug!(
46- current_slot =
47- $self. config. slot_calculator. current_slot( ) . expect( "host chain has started" ) ,
48- initial_slot = $initial_slot,
49- "slot changed before submission - skipping block"
50- ) ;
45+ $span. in_scope( || {
46+ debug!(
47+ current_slot = $self
48+ . config
49+ . slot_calculator
50+ . current_slot( )
51+ . expect( "host chain has started" ) ,
52+ initial_slot = $initial_slot,
53+ "slot changed before submission - skipping block"
54+ )
55+ } ) ;
5156 counter!( "builder.slot_missed" ) . increment( 1 ) ;
5257 return Ok ( ControlFlow :: Skip ) ;
5358 }
@@ -174,7 +179,7 @@ impl BuilderHelperTask {
174179
175180 // Check at the top of the loop if the slot is still valid. This
176181 // will prevent unnecessary retries if the slot has changed.
177- check_slot_still_valid ! ( self , expected_slot) ;
182+ check_slot_still_valid ! ( self , expected_slot, & span ) ;
178183
179184 let inbound_result = self
180185 . send_transaction ( req)
0 commit comments