@@ -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) ) ) ,
@@ -505,19 +508,15 @@ where
505508 let candidate = SealedCandidate {
506509 payload : payload. clone ( ) ,
507510 fb_payload : fb_payload. clone ( ) ,
511+ build_duration : None ,
508512 } ;
509- let sealed_ctx = SealedCtx {
513+ let slot = SlotMeta {
510514 payload_id : ctx. payload_id ( ) ,
511- block_number : ctx. block_number ( ) ,
512- flashblock_index : fb_payload. index ,
513515 no_tx_pool : ctx. attributes ( ) . no_tx_pool ,
514- executed_tx_count : info. executed_transactions . len ( ) ,
515516 slot_timestamp_secs : config. attributes . timestamp ( ) ,
516517 block_time : self . config . block_time ,
517- flashblock_build_duration : None ,
518- enable_tx_tracking_debug_logs : self . config . enable_tx_tracking_debug_logs ,
519518 } ;
520- dispatch_post_seal ( & self . post_seal_hooks , & candidate, & sealed_ctx ) ;
519+ dispatch_post_seal ( & self . post_seal_hooks , & candidate, & slot ) ;
521520 best_payload_tx. send_replace ( Some ( payload) ) ;
522521
523522 info ! (
@@ -794,25 +793,20 @@ where
794793 new_payload,
795794 fb_payload : built_fb_payload,
796795 build_duration,
797- executed_tx_count,
798796 } = result;
799797
800798 let candidate = SealedCandidate {
801799 payload : new_payload. clone ( ) ,
802800 fb_payload : built_fb_payload,
801+ build_duration : Some ( build_duration) ,
803802 } ;
804- let sealed_ctx = SealedCtx {
803+ let slot = SlotMeta {
805804 payload_id : ctx. payload_id ( ) ,
806- block_number : ctx. block_number ( ) ,
807- flashblock_index : candidate. fb_payload . index ,
808805 no_tx_pool : ctx. attributes ( ) . no_tx_pool ,
809- executed_tx_count,
810806 slot_timestamp_secs : ctx. attributes ( ) . timestamp ( ) ,
811807 block_time : self . config . block_time ,
812- flashblock_build_duration : Some ( build_duration) ,
813- enable_tx_tracking_debug_logs : self . config . enable_tx_tracking_debug_logs ,
814808 } ;
815- dispatch_post_seal ( & self . post_seal_hooks , & candidate, & sealed_ctx ) ;
809+ dispatch_post_seal ( & self . post_seal_hooks , & candidate, & slot ) ;
816810 best_payload_tx. send_replace ( Some ( new_payload) ) ;
817811 next_fb_state
818812 }
@@ -1086,7 +1080,6 @@ where
10861080 new_payload,
10871081 fb_payload,
10881082 build_duration : flashblock_build_start_time. elapsed ( ) ,
1089- executed_tx_count : info. executed_transactions . len ( ) ,
10901083 } ) )
10911084 }
10921085 }
0 commit comments