@@ -8355,16 +8355,10 @@ fn new_tenure_while_validating_previous_scenario() {
8355
8355
8356
8356
#[test]
8357
8357
#[ignore]
8358
- #[should_panic]
8359
8358
/// Test that a miner will extend its tenure after the succeding miner fails to mine a block.
8360
8359
/// - Miner 1 wins a tenure and mines normally
8361
8360
/// - Miner 2 wins a tenure but fails to mine a block
8362
8361
/// - Miner 1 extends its tenure
8363
- ///
8364
- /// As of today, this test will panic because Miner 1 will not issue a TenureExtend due to Miner
8365
- /// 2's preceding block-commit being seemingly-valid. This test verifies that this panic does
8366
- /// indeed occur, and will be subsequently modified once the mienr code is updated so that miner 1
8367
- /// can deduce that miner 2 is likely offline.
8368
8362
fn tenure_extend_after_failed_miner() {
8369
8363
if env::var("BITCOIND_TEST") != Ok("1".into()) {
8370
8364
return;
@@ -8395,6 +8389,8 @@ fn tenure_extend_after_failed_miner() {
8395
8389
let mut node_2_listeners = Vec::new();
8396
8390
8397
8391
let max_nakamoto_tenures = 30;
8392
+ let block_proposal_timeout = Duration::from_secs(30);
8393
+ let tenure_extend_wait_timeout = block_proposal_timeout;
8398
8394
8399
8395
info!("------------------------- Test Setup -------------------------");
8400
8396
// partition the signer set so that ~half are listening and using node 1 for RPC and events,
@@ -8410,7 +8406,7 @@ fn tenure_extend_after_failed_miner() {
8410
8406
&node_2_rpc_bind
8411
8407
};
8412
8408
signer_config.node_host = node_host.to_string();
8413
- signer_config.block_proposal_timeout = Duration::from_secs(30) ;
8409
+ signer_config.block_proposal_timeout = block_proposal_timeout ;
8414
8410
},
8415
8411
|config| {
8416
8412
config.node.rpc_bind = format!("{localhost}:{node_1_rpc}");
@@ -8425,6 +8421,7 @@ fn tenure_extend_after_failed_miner() {
8425
8421
config.node.local_peer_seed = btc_miner_1_seed.clone();
8426
8422
config.burnchain.local_mining_public_key = Some(btc_miner_1_pk.to_hex());
8427
8423
config.miner.mining_key = Some(Secp256k1PrivateKey::from_seed(&[1]));
8424
+ config.miner.tenure_extend_wait_timeout = tenure_extend_wait_timeout;
8428
8425
8429
8426
config.events_observers.retain(|listener| {
8430
8427
let Ok(addr) = std::net::SocketAddr::from_str(&listener.endpoint) else {
0 commit comments