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