@@ -4164,21 +4164,36 @@ fn locally_rejected_blocks_overriden_by_global_acceptance() {
4164
4164
info_before. stacks_tip_height + 1 ,
4165
4165
info_after. stacks_tip_height
4166
4166
) ;
4167
- let nmb_signatures = signer_test
4168
- . stacks_client
4169
- . get_tenure_tip ( & info_after. stacks_tip_consensus_hash )
4170
- . expect ( "Failed to get tip" )
4171
- . as_stacks_nakamoto ( )
4172
- . expect ( "Not a Nakamoto block" )
4173
- . signer_signature
4174
- . len ( ) ;
4175
- assert_eq ! ( nmb_signatures, num_signers) ;
4176
4167
4177
4168
// Ensure that the block was accepted globally so the stacks tip has advanced to N
4178
4169
let nakamoto_blocks = test_observer:: get_mined_nakamoto_blocks ( ) ;
4179
4170
let block_n = nakamoto_blocks. last ( ) . unwrap ( ) ;
4180
4171
assert_eq ! ( info_after. stacks_tip. to_string( ) , block_n. block_hash) ;
4181
4172
4173
+ // Make sure that ALL signers accepted the block proposal
4174
+ wait_for ( short_timeout, || {
4175
+ let signatures = test_observer:: get_stackerdb_chunks ( )
4176
+ . into_iter ( )
4177
+ . flat_map ( |chunk| chunk. modified_slots )
4178
+ . filter_map ( |chunk| {
4179
+ let message = SignerMessage :: consensus_deserialize ( & mut chunk. data . as_slice ( ) )
4180
+ . expect ( "Failed to deserialize SignerMessage" ) ;
4181
+ match message {
4182
+ SignerMessage :: BlockResponse ( BlockResponse :: Accepted ( ( hash, signature) ) ) => {
4183
+ if hash == block_n. signer_signature_hash {
4184
+ Some ( signature)
4185
+ } else {
4186
+ None
4187
+ }
4188
+ }
4189
+ _ => None ,
4190
+ }
4191
+ } )
4192
+ . collect :: < Vec < _ > > ( ) ;
4193
+ Ok ( signatures. len ( ) == num_signers)
4194
+ } )
4195
+ . expect ( "FAIL: Timed out waiting for block proposal acceptance by ALL signers" ) ;
4196
+
4182
4197
info ! ( "------------------------- Mine Nakamoto Block N+1 -------------------------" ) ;
4183
4198
// Make less than 30% of the signers reject the block and ensure it is STILL marked globally accepted
4184
4199
let rejecting_signers: Vec < _ > = signer_test
0 commit comments