@@ -8,7 +8,7 @@ use crate::{
88 context:: { OpPayloadBuilderCtx , OpPayloadJobCtx } ,
99 generator:: { BuildArguments , PayloadBuilder } ,
1010 hooks:: {
11- ChannelHook , MetricsHook , PostSealHook , SealedCandidate , SealedCtx , WsHook ,
11+ ChannelHook , MetricsHook , PostSealHook , SealedCandidate , SlotMeta , WsHook ,
1212 dispatch_post_seal,
1313 } ,
1414 timing:: FlashblockScheduler ,
@@ -113,7 +113,6 @@ struct FlashblockBuildResult {
113113 new_payload : OpBuiltPayload ,
114114 fb_payload : OpFlashblockPayload ,
115115 build_duration : core:: time:: Duration ,
116- executed_tx_count : usize ,
117116}
118117
119118impl FlashblocksState {
@@ -329,7 +328,11 @@ where
329328
330329 let ws_pub = Arc :: new ( ws_pub) ;
331330 let post_seal_hooks: Vec < Box < dyn PostSealHook > > = vec ! [
332- Box :: new( WsHook :: new( Arc :: clone( & ws_pub) , Arc :: clone( & metrics) ) ) ,
331+ Box :: new( WsHook :: new(
332+ Arc :: clone( & ws_pub) ,
333+ Arc :: clone( & metrics) ,
334+ config. enable_tx_tracking_debug_logs,
335+ ) ) ,
333336 Box :: new( ChannelHook :: new( "p2p" , built_fb_payload_tx) ) ,
334337 Box :: new( ChannelHook :: new( "engine" , built_payload_tx) ) ,
335338 Box :: new( MetricsHook :: new( Arc :: clone( & metrics) ) ) ,
@@ -510,19 +513,15 @@ where
510513 let candidate = SealedCandidate {
511514 payload : payload. clone ( ) ,
512515 fb_payload : fb_payload. clone ( ) ,
516+ build_duration : None ,
513517 } ;
514- let sealed_ctx = SealedCtx {
518+ let slot = SlotMeta {
515519 payload_id : ctx. payload_id ( ) ,
516- block_number : ctx. block_number ( ) ,
517- flashblock_index : fb_payload. index ,
518520 no_tx_pool : ctx. attributes ( ) . no_tx_pool ,
519- executed_tx_count : info. executed_transactions . len ( ) ,
520521 slot_timestamp_secs : config. attributes . timestamp ( ) ,
521522 block_time : self . config . block_time ,
522- flashblock_build_duration : None ,
523- enable_tx_tracking_debug_logs : self . config . enable_tx_tracking_debug_logs ,
524523 } ;
525- dispatch_post_seal ( & self . post_seal_hooks , & candidate, & sealed_ctx ) ;
524+ dispatch_post_seal ( & self . post_seal_hooks , & candidate, & slot ) ;
526525 best_payload_tx. send_replace ( Some ( payload) ) ;
527526
528527 info ! (
@@ -799,25 +798,20 @@ where
799798 new_payload,
800799 fb_payload : built_fb_payload,
801800 build_duration,
802- executed_tx_count,
803801 } = result;
804802
805803 let candidate = SealedCandidate {
806804 payload : new_payload. clone ( ) ,
807805 fb_payload : built_fb_payload,
806+ build_duration : Some ( build_duration) ,
808807 } ;
809- let sealed_ctx = SealedCtx {
808+ let slot = SlotMeta {
810809 payload_id : ctx. payload_id ( ) ,
811- block_number : ctx. block_number ( ) ,
812- flashblock_index : candidate. fb_payload . index ,
813810 no_tx_pool : ctx. attributes ( ) . no_tx_pool ,
814- executed_tx_count,
815811 slot_timestamp_secs : ctx. attributes ( ) . timestamp ( ) ,
816812 block_time : self . config . block_time ,
817- flashblock_build_duration : Some ( build_duration) ,
818- enable_tx_tracking_debug_logs : self . config . enable_tx_tracking_debug_logs ,
819813 } ;
820- dispatch_post_seal ( & self . post_seal_hooks , & candidate, & sealed_ctx ) ;
814+ dispatch_post_seal ( & self . post_seal_hooks , & candidate, & slot ) ;
821815 best_payload_tx. send_replace ( Some ( new_payload) ) ;
822816 next_fb_state
823817 }
@@ -1091,7 +1085,6 @@ where
10911085 new_payload,
10921086 fb_payload,
10931087 build_duration : flashblock_build_start_time. elapsed ( ) ,
1094- executed_tx_count : info. executed_transactions . len ( ) ,
10951088 } ) )
10961089 }
10971090 }
0 commit comments