@@ -5397,12 +5397,7 @@ fn locally_accepted_blocks_overriden_by_global_rejection() {
5397
5397
info ! ( "Submitted tx {tx} in to mine block N" ) ;
5398
5398
wait_for ( short_timeout_secs, || {
5399
5399
Ok ( mined_blocks. load ( Ordering :: SeqCst ) > blocks_before
5400
- && signer_test
5401
- . stacks_client
5402
- . get_peer_info ( )
5403
- . unwrap ( )
5404
- . stacks_tip_height
5405
- > info_before. stacks_tip_height )
5400
+ && signer_test. get_peer_info ( ) . stacks_tip_height > info_before. stacks_tip_height )
5406
5401
} )
5407
5402
. expect ( "Timed out waiting for stacks block N to be mined" ) ;
5408
5403
sender_nonce += 1 ;
@@ -5477,12 +5472,7 @@ fn locally_accepted_blocks_overriden_by_global_rejection() {
5477
5472
5478
5473
wait_for ( short_timeout_secs, || {
5479
5474
Ok ( mined_blocks. load ( Ordering :: SeqCst ) > blocks_before
5480
- && signer_test
5481
- . stacks_client
5482
- . get_peer_info ( )
5483
- . unwrap ( )
5484
- . stacks_tip_height
5485
- > info_before. stacks_tip_height
5475
+ && signer_test. get_peer_info ( ) . stacks_tip_height > info_before. stacks_tip_height
5486
5476
&& test_observer:: get_mined_nakamoto_blocks ( ) . last ( ) . unwrap ( ) != block_n_1)
5487
5477
} )
5488
5478
. expect ( "Timed out waiting for stacks block N+1' to be mined" ) ;
@@ -5563,10 +5553,7 @@ fn locally_rejected_blocks_overriden_by_global_acceptance() {
5563
5553
5564
5554
info ! ( "------------------------- Test Mine Nakamoto Block N -------------------------" ) ;
5565
5555
let mined_blocks = signer_test. running_nodes . counters . naka_mined_blocks . clone ( ) ;
5566
- let info_before = signer_test
5567
- . stacks_client
5568
- . get_peer_info ( )
5569
- . expect ( "Failed to get peer info" ) ;
5556
+ let info_before = signer_test. get_peer_info ( ) ;
5570
5557
5571
5558
// submit a tx so that the miner will mine a stacks block N
5572
5559
let mut sender_nonce = 0 ;
@@ -5583,19 +5570,11 @@ fn locally_rejected_blocks_overriden_by_global_acceptance() {
5583
5570
info ! ( "Submitted tx {tx} in to mine block N" ) ;
5584
5571
5585
5572
wait_for ( short_timeout, || {
5586
- Ok ( signer_test
5587
- . stacks_client
5588
- . get_peer_info ( )
5589
- . expect ( "Failed to get peer info" )
5590
- . stacks_tip_height
5591
- > info_before. stacks_tip_height )
5573
+ Ok ( signer_test. get_peer_info ( ) . stacks_tip_height > info_before. stacks_tip_height )
5592
5574
} )
5593
5575
. expect ( "Timed out waiting for N to be mined and processed" ) ;
5594
5576
5595
- let info_after = signer_test
5596
- . stacks_client
5597
- . get_peer_info ( )
5598
- . expect ( "Failed to get peer info" ) ;
5577
+ let info_after = signer_test. get_peer_info ( ) ;
5599
5578
assert_eq ! (
5600
5579
info_before. stacks_tip_height + 1 ,
5601
5580
info_after. stacks_tip_height
@@ -5623,10 +5602,7 @@ fn locally_rejected_blocks_overriden_by_global_acceptance() {
5623
5602
5624
5603
// submit a tx so that the miner will mine a stacks block N+1
5625
5604
let blocks_before = mined_blocks. load ( Ordering :: SeqCst ) ;
5626
- let info_before = signer_test
5627
- . stacks_client
5628
- . get_peer_info ( )
5629
- . expect ( "Failed to get peer info" ) ;
5605
+ let info_before = signer_test. get_peer_info ( ) ;
5630
5606
let transfer_tx = make_stacks_transfer (
5631
5607
& sender_sk,
5632
5608
sender_nonce,
@@ -5650,10 +5626,7 @@ fn locally_rejected_blocks_overriden_by_global_acceptance() {
5650
5626
. expect ( "Timed out waiting for block rejection of N+1" ) ;
5651
5627
5652
5628
// Assert the block was mined
5653
- let info_after = signer_test
5654
- . stacks_client
5655
- . get_peer_info ( )
5656
- . expect ( "Failed to get peer info" ) ;
5629
+ let info_after = signer_test. get_peer_info ( ) ;
5657
5630
assert_eq ! ( blocks_before + 1 , mined_blocks. load( Ordering :: SeqCst ) ) ;
5658
5631
assert_eq ! (
5659
5632
info_before. stacks_tip_height + 1 ,
@@ -5777,10 +5750,7 @@ fn reorg_locally_accepted_blocks_across_tenures_succeeds() {
5777
5750
info ! ( "------------------------- Starting Tenure A -------------------------" ) ;
5778
5751
info ! ( "------------------------- Test Mine Nakamoto Block N -------------------------" ) ;
5779
5752
let mined_blocks = signer_test. running_nodes . counters . naka_mined_blocks . clone ( ) ;
5780
- let info_before = signer_test
5781
- . stacks_client
5782
- . get_peer_info ( )
5783
- . expect ( "Failed to get peer info" ) ;
5753
+ let info_before = signer_test. get_peer_info ( ) ;
5784
5754
5785
5755
// submit a tx so that the miner will mine a stacks block
5786
5756
let mut sender_nonce = 0 ;
@@ -5796,19 +5766,13 @@ fn reorg_locally_accepted_blocks_across_tenures_succeeds() {
5796
5766
sender_nonce += 1 ;
5797
5767
info ! ( "Submitted tx {tx} in to mine block N" ) ;
5798
5768
wait_for ( short_timeout, || {
5799
- let info_after = signer_test
5800
- . stacks_client
5801
- . get_peer_info ( )
5802
- . expect ( "Failed to get peer info" ) ;
5769
+ let info_after = signer_test. get_peer_info ( ) ;
5803
5770
Ok ( info_after. stacks_tip_height > info_before. stacks_tip_height )
5804
5771
} )
5805
5772
. expect ( "Timed out waiting for block to be mined and processed" ) ;
5806
5773
5807
5774
// Ensure that the block was accepted globally so the stacks tip has advanced to N
5808
- let info_after = signer_test
5809
- . stacks_client
5810
- . get_peer_info ( )
5811
- . expect ( "Failed to get peer info" ) ;
5775
+ let info_after = signer_test. get_peer_info ( ) ;
5812
5776
assert_eq ! (
5813
5777
info_before. stacks_tip_height + 1 ,
5814
5778
info_after. stacks_tip_height
@@ -5834,10 +5798,7 @@ fn reorg_locally_accepted_blocks_across_tenures_succeeds() {
5834
5798
test_observer:: clear ( ) ;
5835
5799
5836
5800
let blocks_before = mined_blocks. load ( Ordering :: SeqCst ) ;
5837
- let info_before = signer_test
5838
- . stacks_client
5839
- . get_peer_info ( )
5840
- . expect ( "Failed to get peer info" ) ;
5801
+ let info_before = signer_test. get_peer_info ( ) ;
5841
5802
5842
5803
// submit a tx so that the miner will ATTEMPT to mine a stacks block N+1
5843
5804
let transfer_tx = make_stacks_transfer (
@@ -5987,10 +5948,7 @@ fn reorg_locally_accepted_blocks_across_tenures_fails() {
5987
5948
info ! ( "------------------------- Starting Tenure A -------------------------" ) ;
5988
5949
info ! ( "------------------------- Test Mine Nakamoto Block N -------------------------" ) ;
5989
5950
let mined_blocks = signer_test. running_nodes . counters . naka_mined_blocks . clone ( ) ;
5990
- let info_before = signer_test
5991
- . stacks_client
5992
- . get_peer_info ( )
5993
- . expect ( "Failed to get peer info" ) ;
5951
+ let info_before = signer_test. get_peer_info ( ) ;
5994
5952
5995
5953
// submit a tx so that the miner will mine a stacks block
5996
5954
let mut sender_nonce = 0 ;
@@ -6193,10 +6151,7 @@ fn miner_recovers_when_broadcast_block_delay_across_tenures_occurs() {
6193
6151
6194
6152
let mined_blocks = signer_test. running_nodes . counters . naka_mined_blocks . clone ( ) ;
6195
6153
let blocks_before = mined_blocks. load ( Ordering :: SeqCst ) ;
6196
- let info_before = signer_test
6197
- . stacks_client
6198
- . get_peer_info ( )
6199
- . expect ( "Failed to get peer info" ) ;
6154
+ let info_before = signer_test. get_peer_info ( ) ;
6200
6155
// submit a tx so that the miner will mine a stacks block
6201
6156
let mut sender_nonce = 0 ;
6202
6157
let transfer_tx = make_stacks_transfer (
@@ -6771,11 +6726,7 @@ fn continue_after_tenure_extend() {
6771
6726
}
6772
6727
6773
6728
wait_for ( 30 , || {
6774
- let new_burn_height = signer_test
6775
- . stacks_client
6776
- . get_peer_info ( )
6777
- . expect ( "Failed to get peer info" )
6778
- . burn_block_height ;
6729
+ let new_burn_height = signer_test. get_peer_info ( ) . burn_block_height ;
6779
6730
Ok ( new_burn_height == burn_height + 2 )
6780
6731
} )
6781
6732
. expect ( "Timed out waiting for burnchain to advance" ) ;
@@ -8345,10 +8296,7 @@ fn global_acceptance_depends_on_block_announcement() {
8345
8296
signer_test. boot_to_epoch_3 ( ) ;
8346
8297
8347
8298
info ! ( "------------------------- Test Mine Nakamoto Block N -------------------------" ) ;
8348
- let info_before = signer_test
8349
- . stacks_client
8350
- . get_peer_info ( )
8351
- . expect ( "Failed to get peer info" ) ;
8299
+ let info_before = signer_test. get_peer_info ( ) ;
8352
8300
8353
8301
test_observer:: clear ( ) ;
8354
8302
// submit a tx so that the miner will mine a stacks block N
@@ -8366,19 +8314,11 @@ fn global_acceptance_depends_on_block_announcement() {
8366
8314
info ! ( "Submitted tx {tx} in to mine block N" ) ;
8367
8315
8368
8316
wait_for ( short_timeout, || {
8369
- Ok ( signer_test
8370
- . stacks_client
8371
- . get_peer_info ( )
8372
- . expect ( "Failed to get peer info" )
8373
- . stacks_tip_height
8374
- > info_before. stacks_tip_height )
8317
+ Ok ( signer_test. get_peer_info ( ) . stacks_tip_height > info_before. stacks_tip_height )
8375
8318
} )
8376
8319
. expect ( "Timed out waiting for N to be mined and processed" ) ;
8377
8320
8378
- let info_after = signer_test
8379
- . stacks_client
8380
- . get_peer_info ( )
8381
- . expect ( "Failed to get peer info" ) ;
8321
+ let info_after = signer_test. get_peer_info ( ) ;
8382
8322
assert_eq ! (
8383
8323
info_before. stacks_tip_height + 1 ,
8384
8324
info_after. stacks_tip_height
@@ -8408,10 +8348,7 @@ fn global_acceptance_depends_on_block_announcement() {
8408
8348
test_observer:: clear ( ) ;
8409
8349
8410
8350
// submit a tx so that the miner will mine a stacks block N+1
8411
- let info_before = signer_test
8412
- . stacks_client
8413
- . get_peer_info ( )
8414
- . expect ( "Failed to get peer info" ) ;
8351
+ let info_before = signer_test. get_peer_info ( ) ;
8415
8352
let transfer_tx = make_stacks_transfer (
8416
8353
& sender_sk,
8417
8354
sender_nonce,
@@ -8466,10 +8403,7 @@ fn global_acceptance_depends_on_block_announcement() {
8466
8403
TEST_IGNORE_SIGNERS . set ( false ) ;
8467
8404
TEST_SKIP_BLOCK_BROADCAST . set ( false ) ;
8468
8405
test_observer:: clear ( ) ;
8469
- let info_before = signer_test
8470
- . stacks_client
8471
- . get_peer_info ( )
8472
- . expect ( "Failed to get peer info" ) ;
8406
+ let info_before = signer_test. get_peer_info ( ) ;
8473
8407
next_block_and (
8474
8408
& mut signer_test. running_nodes . btc_regtest_controller ,
8475
8409
60 ,
@@ -8483,10 +8417,7 @@ fn global_acceptance_depends_on_block_announcement() {
8483
8417
} ,
8484
8418
)
8485
8419
. expect ( "Stacks miner failed to produce new blocks during the newest burn block's tenure" ) ;
8486
- let info_after = signer_test
8487
- . stacks_client
8488
- . get_peer_info ( )
8489
- . expect ( "Failed to get peer info" ) ;
8420
+ let info_after = signer_test. get_peer_info ( ) ;
8490
8421
let info_after_stacks_block_id = StacksBlockId :: new (
8491
8422
& info_after. stacks_tip_consensus_hash ,
8492
8423
& info_after. stacks_tip ,
@@ -9401,10 +9332,7 @@ fn injected_signatures_are_ignored_across_boundaries() {
9401
9332
assert_eq ! ( non_ignoring_signers. len( ) , 2 ) ;
9402
9333
TEST_IGNORE_ALL_BLOCK_PROPOSALS . set ( ignoring_signers. clone ( ) ) ;
9403
9334
9404
- let info_before = signer_test
9405
- . stacks_client
9406
- . get_peer_info ( )
9407
- . expect ( "Failed to get peer info" ) ;
9335
+ let info_before = signer_test. get_peer_info ( ) ;
9408
9336
// submit a tx so that the miner will ATTEMPT to mine a stacks block N
9409
9337
let transfer_tx = make_stacks_transfer (
9410
9338
& sender_sk,
@@ -9478,10 +9406,7 @@ fn injected_signatures_are_ignored_across_boundaries() {
9478
9406
. expect ( "Failed to find block proposal for reward cycle {curr_reward_cycle}" ) ;
9479
9407
9480
9408
let blocks_after = mined_blocks. load ( Ordering :: SeqCst ) ;
9481
- let info_after = signer_test
9482
- . stacks_client
9483
- . get_peer_info ( )
9484
- . expect ( "Failed to get peer info" ) ;
9409
+ let info_after = signer_test. get_peer_info ( ) ;
9485
9410
assert_eq ! ( blocks_after, blocks_before) ;
9486
9411
assert_eq ! ( info_after, info_before) ;
9487
9412
0 commit comments