@@ -79,49 +79,6 @@ fn main() {
7979fn build_pipeline (
8080 cli_args : & BuilderArgs ,
8181 pool : & OrderPool < Flashblocks > ,
82- ) -> eyre:: Result < Pipeline < Flashblocks > > {
83- let pipeline = if cli_args. flashblocks_args . enabled ( ) {
84- build_flashblocks_pipeline ( cli_args, pool) ?
85- } else {
86- build_classic_pipeline ( cli_args, pool)
87- } ;
88- pool. attach_pipeline ( & pipeline) ;
89-
90- Ok ( pipeline)
91- }
92-
93- /// Classic block builder
94- ///
95- /// Block building strategy that builds blocks using the classic approach by
96- /// producing one block payload per CL payload job.
97- fn build_classic_pipeline (
98- cli_args : & BuilderArgs ,
99- pool : & OrderPool < Flashblocks > ,
100- ) -> Pipeline < Flashblocks > {
101- if cli_args. revert_protection {
102- Pipeline :: < Flashblocks > :: named ( "classic" )
103- . with_prologue ( OptimismPrologue )
104- . with_pipeline (
105- Loop ,
106- (
107- AppendOrders :: from_pool ( pool) ,
108- OrderByPriorityFee :: default ( ) ,
109- RemoveRevertedTransactions :: default ( ) ,
110- ) ,
111- )
112- } else {
113- Pipeline :: < Flashblocks > :: named ( "classic" )
114- . with_prologue ( OptimismPrologue )
115- . with_pipeline (
116- Loop ,
117- ( AppendOrders :: from_pool ( pool) , OrderByPriorityFee :: default ( ) ) ,
118- )
119- }
120- }
121-
122- fn build_flashblocks_pipeline (
123- cli_args : & BuilderArgs ,
124- pool : & OrderPool < Flashblocks > ,
12582) -> eyre:: Result < Pipeline < Flashblocks > > {
12683 let socket_address = cli_args
12784 . flashblocks_args
@@ -191,7 +148,9 @@ fn build_flashblocks_pipeline(
191148 . with_step ( BreakAfterMaxFlashblocks :: new ( flashblock_number) ) ,
192149 )
193150 . with_limits ( Scaled :: default ( ) . deadline ( total_building_time) ) ;
151+
194152 ws. watch_shutdown ( & pipeline) ;
153+ pool. attach_pipeline ( & pipeline) ;
195154
196155 Ok ( pipeline)
197156}
0 commit comments