Skip to content

Commit af2d015

Browse files
committed
Sanity fixes
1 parent 003351d commit af2d015

File tree

4 files changed

+19
-23
lines changed

4 files changed

+19
-23
lines changed

testnet/stacks-node/src/tests/signer/commands/bitcoin_mining.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use std::sync::Arc;
22

33
use madhouse::{Command, CommandWrapper};
4-
use proptest::prop_oneof;
5-
use proptest::strategy::{Just, Strategy};
4+
use proptest::strategy::Strategy;
65
use tracing::info;
76

87
use super::context::{SignerTestContext, SignerTestState};
@@ -120,7 +119,10 @@ impl Command<SignerTestState, SignerTestContext> for ChainGenerateBitcoinBlocks
120119
) -> impl Strategy<Value = CommandWrapper<SignerTestState, SignerTestContext>> {
121120
(1u64..=5u64).prop_map({
122121
move |num_blocks| {
123-
CommandWrapper::new(ChainGenerateBitcoinBlocks::multiple(ctx.clone(), num_blocks))
122+
CommandWrapper::new(ChainGenerateBitcoinBlocks::multiple(
123+
ctx.clone(),
124+
num_blocks,
125+
))
124126
}
125127
})
126128
}

testnet/stacks-node/src/tests/signer/commands/block_commit.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::sync::Arc;
22

33
use madhouse::{Command, CommandWrapper};
4-
use proptest::prelude::{Just, Strategy};
4+
use proptest::prelude::Strategy;
55

66
use super::context::{SignerTestContext, SignerTestState};
77

@@ -62,12 +62,11 @@ impl Command<SignerTestState, SignerTestContext> for MinerSubmitBlockCommit {
6262
),
6363
}
6464

65-
assert!(
66-
self.ctx
67-
.get_counters_for_miner(self.miner_index)
68-
.naka_skip_commit_op
69-
.get()
70-
);
65+
assert!(self
66+
.ctx
67+
.get_counters_for_miner(self.miner_index)
68+
.naka_skip_commit_op
69+
.get());
7170
}
7271

7372
fn label(&self) -> String {
@@ -79,6 +78,6 @@ impl Command<SignerTestState, SignerTestContext> for MinerSubmitBlockCommit {
7978
) -> impl Strategy<Value = CommandWrapper<SignerTestState, SignerTestContext>> {
8079
(1usize..=2usize).prop_map(move |miner_index| {
8180
CommandWrapper::new(MinerSubmitBlockCommit::new(ctx.clone(), miner_index))
82-
})
81+
})
8382
}
8483
}

testnet/stacks-node/src/tests/signer/commands/block_verify.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,12 @@ impl Command<SignerTestState, SignerTestContext> for ChainVerifyMinerBlockCount
120120
fn build(
121121
ctx: Arc<SignerTestContext>,
122122
) -> impl Strategy<Value = CommandWrapper<SignerTestState, SignerTestContext>> {
123-
(1usize..=2usize, 1usize..=5usize).prop_map(
124-
move |(miner_index, expected_block_count)| {
125-
CommandWrapper::new(
126-
ChainVerifyMinerBlockCount::after_boot_to_epoch3(
127-
ctx.clone(),
128-
miner_index,
129-
expected_block_count,
130-
),
131-
)
132-
},
133-
)
123+
(1usize..=2usize, 1usize..=5usize).prop_map(move |(miner_index, expected_block_count)| {
124+
CommandWrapper::new(ChainVerifyMinerBlockCount::after_boot_to_epoch3(
125+
ctx.clone(),
126+
miner_index,
127+
expected_block_count,
128+
))
129+
})
134130
}
135131
}

testnet/stacks-node/src/tests/signer/commands/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::fmt::Debug;
2-
use std::sync::atomic::Ordering;
32
use std::sync::{Arc, Mutex};
43
use std::time::Duration;
54

0 commit comments

Comments
 (0)