Skip to content

Commit

Permalink
Fix test build due to failed merge
Browse files Browse the repository at this point in the history
Signed-off-by: Jacinta Ferrant <[email protected]>
  • Loading branch information
jferrant committed Dec 19, 2024
1 parent 7479356 commit 5510f0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion stacks-signer/src/signerdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ impl SignerDb {

/// Return the last accepted block the signer (highest stacks height). It will tie break a match based on which was more recently signed.
pub fn get_signer_last_accepted_block(&self) -> Result<Option<BlockInfo>, DBError> {
let query = "SELECT block_info FROM blocks WHERE json_extract(block_info, '$.state') IN (?1, ?2) ORDER BY stacks_height DESC, json_extract(block_info, '$.signed_group') DESC, json_extract(block_info, '$.signed_self') DESC LIMIT 1";
let query = "SELECT block_info FROM blocks WHERE state IN (?1, ?2) ORDER BY stacks_height DESC, signed_group DESC, signed_self DESC LIMIT 1";
let args = params![
&BlockState::GloballyAccepted.to_string(),
&BlockState::LocallyAccepted.to_string()
Expand Down
1 change: 1 addition & 0 deletions testnet/stacks-node/src/tests/signer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ impl<S: Signer<T> + Send + 'static, T: SignerEventTrait + 'static> SignerTest<Sp
self.get_latest_block_response(slot_id)
.as_block_accepted()
.expect("Latest block response from slot #{slot_id} isn't a block acceptance")
.clone()
}

/// Get /v2/info from the node
Expand Down
10 changes: 2 additions & 8 deletions testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9833,10 +9833,7 @@ fn no_reorg_due_to_successive_block_validation_ok() {
let rl2_commits_before = rl2_commits.load(Ordering::SeqCst);

info!("------------------------- Pause Block Validation Submission of N+1'-------------------------");
TEST_STALL_BLOCK_VALIDATION_SUBMISSION
.lock()
.unwrap()
.replace(true);
TEST_STALL_BLOCK_VALIDATION_SUBMISSION.set(true);

info!("------------------------- Start Miner 2's Tenure-------------------------");
let burn_height_before = get_burn_height();
Expand Down Expand Up @@ -9929,10 +9926,7 @@ fn no_reorg_due_to_successive_block_validation_ok() {
sleep_ms(5_000);

info!("------------------------- Unpause Block Validation Submission and Response for N+1' -------------------------");
TEST_STALL_BLOCK_VALIDATION_SUBMISSION
.lock()
.unwrap()
.replace(false);
TEST_STALL_BLOCK_VALIDATION_SUBMISSION.set(false);

info!("------------------------- Confirm N+1 is Accepted ------------------------");
wait_for(30, || {
Expand Down

0 comments on commit 5510f0b

Please sign in to comment.