Skip to content

Commit 5e3da7b

Browse files
committed
Enable tenure_extend_after_failed_miner test
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
1 parent e269cfb commit 5e3da7b

File tree

1 file changed

+4
-7
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+4
-7
lines changed

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8355,16 +8355,10 @@ fn new_tenure_while_validating_previous_scenario() {
83558355

83568356
#[test]
83578357
#[ignore]
8358-
#[should_panic]
83598358
/// Test that a miner will extend its tenure after the succeding miner fails to mine a block.
83608359
/// - Miner 1 wins a tenure and mines normally
83618360
/// - Miner 2 wins a tenure but fails to mine a block
83628361
/// - 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.
83688362
fn tenure_extend_after_failed_miner() {
83698363
if env::var("BITCOIND_TEST") != Ok("1".into()) {
83708364
return;
@@ -8395,6 +8389,8 @@ fn tenure_extend_after_failed_miner() {
83958389
let mut node_2_listeners = Vec::new();
83968390

83978391
let max_nakamoto_tenures = 30;
8392+
let block_proposal_timeout = Duration::from_secs(30);
8393+
let tenure_extend_wait_timeout = block_proposal_timeout;
83988394

83998395
info!("------------------------- Test Setup -------------------------");
84008396
// 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() {
84108406
&node_2_rpc_bind
84118407
};
84128408
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;
84148410
},
84158411
|config| {
84168412
config.node.rpc_bind = format!("{localhost}:{node_1_rpc}");
@@ -8425,6 +8421,7 @@ fn tenure_extend_after_failed_miner() {
84258421
config.node.local_peer_seed = btc_miner_1_seed.clone();
84268422
config.burnchain.local_mining_public_key = Some(btc_miner_1_pk.to_hex());
84278423
config.miner.mining_key = Some(Secp256k1PrivateKey::from_seed(&[1]));
8424+
config.miner.tenure_extend_wait_timeout = tenure_extend_wait_timeout;
84288425

84298426
config.events_observers.retain(|listener| {
84308427
let Ok(addr) = std::net::SocketAddr::from_str(&listener.endpoint) else {

0 commit comments

Comments
 (0)