File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
stacks-node/src/tests/signer
stacks-signer/src/chainstate Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -11783,6 +11783,28 @@ fn no_reorg_due_to_successive_block_validation_ok() {
11783
11783
TEST_STALL_BLOCK_VALIDATION_SUBMISSION.set(false);
11784
11784
11785
11785
info!("------------------------- Confirm N+1' is Rejected ------------------------");
11786
+ // Confirm that every single signer has rejected the block and recorded its own rejection signature in its own DB
11787
+ wait_for(30, || {
11788
+ Ok(miners.signer_test.signer_configs.iter().all(|config| {
11789
+ let conn = Connection::open(config.db_path.clone()).unwrap();
11790
+ let mut stmt = conn
11791
+ .prepare(
11792
+ "SELECT 1 FROM block_rejection_signer_addrs
11793
+ WHERE signer_signature_hash = ?1 AND signer_addr = ?2
11794
+ LIMIT 1",
11795
+ )
11796
+ .unwrap();
11797
+
11798
+ let mut rows = stmt
11799
+ .query(rusqlite::params![
11800
+ block_n_1_prime_signature_hash,
11801
+ config.stacks_address
11802
+ ])
11803
+ .unwrap();
11804
+ rows.next().unwrap().is_some()
11805
+ }))
11806
+ })
11807
+ .expect("Failed to verify all signers recorded a signature rejection");
11786
11808
wait_for_block_global_rejection(30, block_n_1_prime_signature_hash, num_signers)
11787
11809
.expect("Failed to find block N+1'");
11788
11810
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ impl SortitionData {
317
317
318
318
if let Some ( info) = last_block_info {
319
319
// N.B. this block might not be the last globally accepted block across the network;
320
- // it's just the highest one in this tenure that we knnge: &TenureChangePow about. If this given block is
320
+ // it's just the highest one in this tenure that we know about. If this given block is
321
321
// no higher than it, then it's definitely no higher than the last globally accepted
322
322
// block across the network, so we can do an early rejection here.
323
323
if block. header . chain_length <= info. block . header . chain_length {
You can’t perform that action at this time.
0 commit comments