File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
testnet/stacks-node/src/tests/signer Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -9829,14 +9829,19 @@ fn global_acceptance_depends_on_block_announcement() {
9829
9829
. stacks_client
9830
9830
. get_peer_info ( )
9831
9831
. expect ( "Failed to get peer info" ) ;
9832
- Ok ( info. stacks_tip_height > info_before. stacks_tip_height )
9832
+ Ok ( info. stacks_tip_height > info_before. stacks_tip_height
9833
+ && info_before. stacks_tip_consensus_hash != info. stacks_tip_consensus_hash )
9833
9834
} ,
9834
9835
)
9835
- . unwrap ( ) ;
9836
+ . expect ( "Stacks miner failed to produce new blocks during the newest burn block's tenure" ) ;
9836
9837
let info_after = signer_test
9837
9838
. stacks_client
9838
9839
. get_peer_info ( )
9839
9840
. expect ( "Failed to get peer info" ) ;
9841
+ let info_after_stacks_block_id = StacksBlockId :: new (
9842
+ & info_after. stacks_tip_consensus_hash ,
9843
+ & info_after. stacks_tip ,
9844
+ ) ;
9840
9845
let mut sister_block = None ;
9841
9846
let start_time = Instant :: now ( ) ;
9842
9847
while sister_block. is_none ( ) && start_time. elapsed ( ) < Duration :: from_secs ( 45 ) {
@@ -9846,17 +9851,14 @@ fn global_acceptance_depends_on_block_announcement() {
9846
9851
. find_map ( |chunk| {
9847
9852
let message = SignerMessage :: consensus_deserialize ( & mut chunk. data . as_slice ( ) )
9848
9853
. expect ( "Failed to deserialize SignerMessage" ) ;
9849
- match message {
9850
- SignerMessage :: BlockProposal ( proposal) => {
9851
- if proposal. block . header . consensus_hash
9852
- == info_after. stacks_tip_consensus_hash
9853
- {
9854
- Some ( proposal. block )
9855
- } else {
9856
- None
9857
- }
9854
+ if let SignerMessage :: BlockProposal ( proposal) = message {
9855
+ if proposal. block . block_id ( ) == info_after_stacks_block_id {
9856
+ Some ( proposal. block )
9857
+ } else {
9858
+ None
9858
9859
}
9859
- _ => None ,
9860
+ } else {
9861
+ None
9860
9862
}
9861
9863
} ) ;
9862
9864
}
You can’t perform that action at this time.
0 commit comments