@@ -29,6 +29,8 @@ use libsigner::v0::messages::{
29
29
use libsigner::{
30
30
BlockProposal, BlockProposalData, SignerSession, StackerDBSession, VERSION_STRING,
31
31
};
32
+ use madhouse::{execute_commands, prop_allof, scenario, Command};
33
+ use proptest::prelude::Strategy;
32
34
use rand::{thread_rng, Rng};
33
35
use rusqlite::Connection;
34
36
use stacks::address::AddressHashMode;
@@ -51,6 +53,7 @@ use stacks::core::test_util::{
51
53
};
52
54
use stacks::core::{StacksEpochId, CHAIN_ID_TESTNET};
53
55
use stacks::libstackerdb::StackerDBChunkData;
56
+ use stacks::net::api::getinfo::RPCPeerInfoData;
54
57
use stacks::net::api::getsigner::GetSignerResponse;
55
58
use stacks::net::api::postblock_proposal::{
56
59
BlockValidateResponse, ValidateRejectCode, TEST_VALIDATE_DELAY_DURATION_SECS,
@@ -93,7 +96,7 @@ use crate::nakamoto_node::miner::{
93
96
TEST_P2P_BROADCAST_STALL,
94
97
};
95
98
use crate::nakamoto_node::stackerdb_listener::TEST_IGNORE_SIGNERS;
96
- use crate::neon::Counters;
99
+ use crate::neon::{ Counters, RunLoopCounter} ;
97
100
use crate::run_loop::boot_nakamoto;
98
101
use crate::tests::nakamoto_integrations::{
99
102
boot_to_epoch_25, boot_to_epoch_3_reward_set, next_block_and, next_block_and_controller,
@@ -104,9 +107,18 @@ use crate::tests::neon_integrations::{
104
107
get_account, get_chain_info, get_chain_info_opt, get_sortition_info, get_sortition_info_ch,
105
108
next_block_and_wait, run_until_burnchain_height, submit_tx, submit_tx_fallible, test_observer,
106
109
};
110
+ use crate::tests::signer::commands::*;
107
111
use crate::tests::{self, gen_random_port};
108
112
use crate::{nakamoto_node, BitcoinRegtestController, BurnchainController, Config, Keychain};
109
113
114
+ pub fn get_chain_info_wrapper(conf: &Config) -> RPCPeerInfoData {
115
+ get_chain_info(conf)
116
+ }
117
+
118
+ pub fn test_mine_stall_set(value: bool) {
119
+ TEST_MINE_STALL.set(value)
120
+ }
121
+
110
122
impl SignerTest<SpawnedSigner> {
111
123
/// Run the test until the first epoch 2.5 reward cycle.
112
124
/// Will activate pox-4 and register signers for the first full Epoch 2.5 reward cycle.
@@ -616,6 +628,32 @@ impl MultipleMinerTest {
616
628
}
617
629
}
618
630
631
+ pub fn get_primary_skip_commit_flag(&self) -> stacks::util::tests::TestFlag<bool> {
632
+ self.signer_test
633
+ .running_nodes
634
+ .counters
635
+ .naka_skip_commit_op
636
+ .clone()
637
+ }
638
+
639
+ pub fn get_secondary_skip_commit_flag(&self) -> stacks::util::tests::TestFlag<bool> {
640
+ self.rl2_counters.naka_skip_commit_op.clone()
641
+ }
642
+
643
+ pub fn get_primary_last_stacks_tip_counter(&self) -> RunLoopCounter {
644
+ self.signer_test
645
+ .running_nodes
646
+ .counters
647
+ .naka_submitted_commit_last_stacks_tip
648
+ .clone()
649
+ }
650
+
651
+ pub fn get_secondary_last_stacks_tip_counter(&self) -> RunLoopCounter {
652
+ self.rl2_counters
653
+ .naka_submitted_commit_last_stacks_tip
654
+ .clone()
655
+ }
656
+
619
657
/// Boot node 1 to epoch 3.0 and wait for node 2 to catch up.
620
658
pub fn boot_to_epoch_3(&mut self) {
621
659
info!(
@@ -1160,7 +1198,7 @@ fn wait_for_block_pushed(
1160
1198
}
1161
1199
1162
1200
/// Waits for a block with the provided expected height to be proposed and pushed by the miner with the provided public key.
1163
- fn wait_for_block_pushed_by_miner_key(
1201
+ pub fn wait_for_block_pushed_by_miner_key(
1164
1202
timeout_secs: u64,
1165
1203
expected_height: u64,
1166
1204
miner_key: &StacksPublicKey,
0 commit comments