@@ -11534,14 +11534,13 @@ fn multiple_miners_empty_sortition() {
11534
11534
11535
11535
#[ test]
11536
11536
#[ ignore]
11537
- /// This test spins up two nakamoto nodes, both configured to mine.
11537
+ /// This test spins up a single nakamoto node configured to mine.
11538
11538
/// After Nakamoto blocks are mined, it waits for a normal tenure, then issues
11539
11539
/// two bitcoin blocks in quick succession -- the first will contain block commits,
11540
11540
/// and the second "flash block" will contain no block commits.
11541
- /// The test checks if the winner of the first block is different than the previous tenure.
11542
- /// If so, it performs the actual test: asserting that the miner wakes up and produces valid blocks.
11543
- /// This test uses the burn-block-height to ensure consistent calculation of the burn view between
11544
- /// the miner thread and the block processor
11541
+ /// The test then tries to continue producing a normal tenure: issuing a bitcoin block
11542
+ /// with a sortition in it.
11543
+ /// The test does 3 rounds of this to make sure that the network continues producing blocks throughout.
11545
11544
fn single_miner_empty_sortition ( ) {
11546
11545
if env:: var ( "BITCOIND_TEST" ) != Ok ( "1" . into ( ) ) {
11547
11546
return ;
@@ -11551,52 +11550,15 @@ fn single_miner_empty_sortition() {
11551
11550
let sender_addr = tests:: to_addr ( & sender_sk) ;
11552
11551
let send_fee = 180 ;
11553
11552
11554
- let btc_miner_1_seed = vec ! [ 1 , 1 , 1 , 1 ] ;
11555
- let btc_miner_1_pk = Keychain :: default ( btc_miner_1_seed. clone ( ) ) . get_pub_key ( ) ;
11556
-
11557
- let node_1_rpc = gen_random_port ( ) ;
11558
- let node_1_p2p = gen_random_port ( ) ;
11559
-
11560
- let localhost = "127.0.0.1" ;
11561
- let node_1_rpc_bind = format ! ( "{localhost}:{node_1_rpc}" ) ;
11562
-
11563
- let max_nakamoto_tenures = 30 ;
11564
11553
// partition the signer set so that ~half are listening and using node 1 for RPC and events,
11565
11554
// and the rest are using node 2
11566
11555
11567
- let mut signer_test: SignerTest < SpawnedSigner > = SignerTest :: new_with_config_modifications (
11568
- num_signers,
11569
- vec ! [ ( sender_addr, send_fee * 2 * 60 + 1000 ) ] ,
11570
- |signer_config| {
11571
- let node_host = & node_1_rpc_bind;
11572
- signer_config. node_host = node_host. to_string ( ) ;
11573
- } ,
11574
- |config| {
11575
- config. node . rpc_bind = format ! ( "{localhost}:{node_1_rpc}" ) ;
11576
- config. node . p2p_bind = format ! ( "{localhost}:{node_1_p2p}" ) ;
11577
- config. node . data_url = format ! ( "http://{localhost}:{node_1_rpc}" ) ;
11578
- config. node . p2p_address = format ! ( "{localhost}:{node_1_p2p}" ) ;
11579
- config. miner . wait_on_interim_blocks = Duration :: from_secs ( 5 ) ;
11580
- config. node . pox_sync_sample_secs = 30 ;
11581
- config. burnchain . pox_reward_length = Some ( max_nakamoto_tenures) ;
11582
-
11583
- config. node . seed = btc_miner_1_seed. clone ( ) ;
11584
- config. node . local_peer_seed = btc_miner_1_seed. clone ( ) ;
11585
- config. burnchain . local_mining_public_key = Some ( btc_miner_1_pk. to_hex ( ) ) ;
11586
- config. miner . mining_key = Some ( Secp256k1PrivateKey :: from_seed ( & [ 1 ] ) ) ;
11587
- } ,
11588
- Some ( vec ! [ btc_miner_1_pk] ) ,
11589
- None ,
11590
- ) ;
11556
+ let mut signer_test: SignerTest < SpawnedSigner > =
11557
+ SignerTest :: new ( num_signers, vec ! [ ( sender_addr, send_fee * 2 * 60 + 1000 ) ] ) ;
11591
11558
let conf = signer_test. running_nodes . conf . clone ( ) ;
11592
11559
11593
- let node_1_sk = Secp256k1PrivateKey :: from_seed ( & conf. node . local_peer_seed ) ;
11594
- let node_1_pk = StacksPublicKey :: from_private ( & node_1_sk) ;
11595
-
11596
11560
signer_test. boot_to_epoch_3 ( ) ;
11597
11561
11598
- let pre_nakamoto_peer_1_height = get_chain_info ( & conf) . stacks_tip_height ;
11599
-
11600
11562
info ! ( "------------------------- Reached Epoch 3.0 -------------------------" ) ;
11601
11563
11602
11564
let burn_height_contract = "
@@ -11621,7 +11583,6 @@ fn single_miner_empty_sortition() {
11621
11583
for _i in 0 ..3 {
11622
11584
// Mine 1 nakamoto tenures
11623
11585
info ! ( "Mining tenure..." ) ;
11624
- let rl1_commits_before = rl1_commits. load ( Ordering :: SeqCst ) ;
11625
11586
11626
11587
signer_test. mine_block_wait_on_processing (
11627
11588
& [ & rl1_coord_channels] ,
0 commit comments