@@ -139,12 +139,9 @@ async fn validate_then_repropose(#[case] execute_all_txs: bool) {
139139 let transactions =
140140 ProposalPart :: Transactions ( TransactionBatch { transactions : TX_BATCH . to_vec ( ) } ) ;
141141 content_sender. send ( transactions. clone ( ) ) . await . unwrap ( ) ;
142- content_sender
143- . send ( ProposalPart :: ExecutedTransactionCount ( n_executed_txs_count. try_into ( ) . unwrap ( ) ) )
144- . await
145- . unwrap ( ) ;
146142 let fin = ProposalPart :: Fin ( ProposalFin {
147143 proposal_commitment : ProposalCommitment ( STATE_DIFF_COMMITMENT . 0 . 0 ) ,
144+ executed_transaction_count : n_executed_txs_count. try_into ( ) . unwrap ( ) ,
148145 } ) ;
149146 content_sender. send ( fin. clone ( ) ) . await . unwrap ( ) ;
150147 let fin_receiver =
@@ -161,10 +158,6 @@ async fn validate_then_repropose(#[case] execute_all_txs: bool) {
161158 receiver. next( ) . await . unwrap( ) ,
162159 ProposalPart :: Transactions ( TransactionBatch { transactions: executed_transactions } )
163160 ) ;
164- assert_eq ! (
165- receiver. next( ) . await . unwrap( ) ,
166- ProposalPart :: ExecutedTransactionCount ( n_executed_txs_count. try_into( ) . unwrap( ) )
167- ) ;
168161 assert_eq ! ( receiver. next( ) . await . unwrap( ) , fin) ;
169162 assert ! ( receiver. next( ) . await . is_none( ) ) ;
170163}
@@ -181,18 +174,16 @@ async fn proposals_from_different_rounds() {
181174 // Proposal parts sent in the proposals.
182175 let prop_part_txs =
183176 ProposalPart :: Transactions ( TransactionBatch { transactions : TX_BATCH . to_vec ( ) } ) ;
184- let prop_part_executed_count =
185- ProposalPart :: ExecutedTransactionCount ( INTERNAL_TX_BATCH . len ( ) . try_into ( ) . unwrap ( ) ) ;
186177 let prop_part_fin = ProposalPart :: Fin ( ProposalFin {
187178 proposal_commitment : ProposalCommitment ( STATE_DIFF_COMMITMENT . 0 . 0 ) ,
179+ executed_transaction_count : INTERNAL_TX_BATCH . len ( ) . try_into ( ) . unwrap ( ) ,
188180 } ) ;
189181
190182 // The proposal from the past round is ignored.
191183 let ( mut content_sender, content_receiver) =
192184 mpsc:: channel ( context. config . static_config . proposal_buffer_size ) ;
193185 content_sender. send ( ProposalPart :: BlockInfo ( block_info ( BlockNumber ( 0 ) ) ) ) . await . unwrap ( ) ;
194186 content_sender. send ( prop_part_txs. clone ( ) ) . await . unwrap ( ) ;
195- content_sender. send ( prop_part_executed_count. clone ( ) ) . await . unwrap ( ) ;
196187
197188 let mut init = ProposalInit { round : 0 , ..Default :: default ( ) } ;
198189 let fin_receiver_past_round = context. validate_proposal ( init, TIMEOUT , content_receiver) . await ;
@@ -204,7 +195,6 @@ async fn proposals_from_different_rounds() {
204195 mpsc:: channel ( context. config . static_config . proposal_buffer_size ) ;
205196 content_sender. send ( ProposalPart :: BlockInfo ( block_info ( BlockNumber ( 0 ) ) ) ) . await . unwrap ( ) ;
206197 content_sender. send ( prop_part_txs. clone ( ) ) . await . unwrap ( ) ;
207- content_sender. send ( prop_part_executed_count. clone ( ) ) . await . unwrap ( ) ;
208198 content_sender. send ( prop_part_fin. clone ( ) ) . await . unwrap ( ) ;
209199 init. round = 1 ;
210200 let fin_receiver_curr_round = context. validate_proposal ( init, TIMEOUT , content_receiver) . await ;
@@ -215,7 +205,6 @@ async fn proposals_from_different_rounds() {
215205 mpsc:: channel ( context. config . static_config . proposal_buffer_size ) ;
216206 content_sender. send ( ProposalPart :: BlockInfo ( block_info ( BlockNumber ( 0 ) ) ) ) . await . unwrap ( ) ;
217207 content_sender. send ( prop_part_txs. clone ( ) ) . await . unwrap ( ) ;
218- content_sender. send ( prop_part_executed_count. clone ( ) ) . await . unwrap ( ) ;
219208 content_sender. send ( prop_part_fin. clone ( ) ) . await . unwrap ( ) ;
220209 let fin_receiver_future_round = context
221210 . validate_proposal (
@@ -284,14 +273,11 @@ async fn build_proposal() {
284273 receiver. next( ) . await . unwrap( ) ,
285274 ProposalPart :: Transactions ( TransactionBatch { transactions: TX_BATCH . to_vec( ) } )
286275 ) ;
287- assert_eq ! (
288- receiver. next( ) . await . unwrap( ) ,
289- ProposalPart :: ExecutedTransactionCount ( INTERNAL_TX_BATCH . len( ) . try_into( ) . unwrap( ) )
290- ) ;
291276 assert_eq ! (
292277 receiver. next( ) . await . unwrap( ) ,
293278 ProposalPart :: Fin ( ProposalFin {
294279 proposal_commitment: ProposalCommitment ( STATE_DIFF_COMMITMENT . 0.0 ) ,
280+ executed_transaction_count: INTERNAL_TX_BATCH . len( ) . try_into( ) . unwrap( ) ,
295281 } )
296282 ) ;
297283 assert ! ( receiver. next( ) . await . is_none( ) ) ;
@@ -494,8 +480,6 @@ async fn propose_then_repropose(#[case] execute_all_txs: bool) {
494480 let _init = receiver. next ( ) . await . unwrap ( ) ;
495481 let block_info = receiver. next ( ) . await . unwrap ( ) ;
496482 let _txs = receiver. next ( ) . await . unwrap ( ) ;
497- let final_n_executed_txs = receiver. next ( ) . await . unwrap ( ) ;
498- assert ! ( matches!( final_n_executed_txs, ProposalPart :: ExecutedTransactionCount ( _) ) ) ;
499483 let fin = receiver. next ( ) . await . unwrap ( ) ;
500484 assert_eq ! ( fin_receiver. await . unwrap( ) . 0 , STATE_DIFF_COMMITMENT . 0.0 ) ;
501485
@@ -514,7 +498,6 @@ async fn propose_then_repropose(#[case] execute_all_txs: bool) {
514498 let reproposed_txs = ProposalPart :: Transactions ( TransactionBatch { transactions } ) ;
515499 assert_eq ! ( receiver. next( ) . await . unwrap( ) , reproposed_txs) ;
516500
517- assert_eq ! ( receiver. next( ) . await . unwrap( ) , final_n_executed_txs) ;
518501 assert_eq ! ( receiver. next( ) . await . unwrap( ) , fin) ;
519502 assert ! ( receiver. next( ) . await . is_none( ) ) ;
520503}
@@ -711,14 +694,11 @@ async fn oracle_fails_on_startup(#[case] l1_oracle_failure: bool) {
711694 receiver. next( ) . await . unwrap( ) ,
712695 ProposalPart :: Transactions ( TransactionBatch { transactions: TX_BATCH . to_vec( ) } )
713696 ) ;
714- assert_eq ! (
715- receiver. next( ) . await . unwrap( ) ,
716- ProposalPart :: ExecutedTransactionCount ( INTERNAL_TX_BATCH . len( ) . try_into( ) . unwrap( ) )
717- ) ;
718697 assert_eq ! (
719698 receiver. next( ) . await . unwrap( ) ,
720699 ProposalPart :: Fin ( ProposalFin {
721700 proposal_commitment: ProposalCommitment ( STATE_DIFF_COMMITMENT . 0.0 ) ,
701+ executed_transaction_count: INTERNAL_TX_BATCH . len( ) . try_into( ) . unwrap( ) ,
722702 } )
723703 ) ;
724704 assert ! ( receiver. next( ) . await . is_none( ) ) ;
@@ -837,14 +817,11 @@ async fn oracle_fails_on_second_block(#[case] l1_oracle_failure: bool) {
837817 receiver. next( ) . await . unwrap( ) ,
838818 ProposalPart :: Transactions ( TransactionBatch { transactions: TX_BATCH . to_vec( ) } )
839819 ) ;
840- assert_eq ! (
841- receiver. next( ) . await . unwrap( ) ,
842- ProposalPart :: ExecutedTransactionCount ( INTERNAL_TX_BATCH . len( ) . try_into( ) . unwrap( ) )
843- ) ;
844820 assert_eq ! (
845821 receiver. next( ) . await . unwrap( ) ,
846822 ProposalPart :: Fin ( ProposalFin {
847823 proposal_commitment: ProposalCommitment ( STATE_DIFF_COMMITMENT . 0.0 ) ,
824+ executed_transaction_count: INTERNAL_TX_BATCH . len( ) . try_into( ) . unwrap( ) ,
848825 } )
849826 ) ;
850827 assert ! ( receiver. next( ) . await . is_none( ) ) ;
0 commit comments