Skip to content

Commit

Permalink
Fix signer_chainstate test and add it to CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jacinta Ferrant <[email protected]>
  • Loading branch information
jferrant committed Nov 5, 2024
1 parent 67e254e commit 0fbe07f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
- tests::nakamoto_integrations::utxo_check_on_startup_panic
- tests::nakamoto_integrations::utxo_check_on_startup_recover
- tests::nakamoto_integrations::v3_signer_api_endpoint
- tests::nakamoto_integrations::signer_chainstate
# TODO: enable these once v1 signer is supported by a new nakamoto epoch
# - tests::signer::v1::dkg
# - tests::signer::v1::sign_request_rejected
Expand Down
3 changes: 2 additions & 1 deletion stacks-signer/src/chainstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,12 @@ impl SortitionsView {
if signed_over_time + tenure_last_block_proposal_timeout.as_secs()
> get_epoch_time_secs()
{
// The last locally accepted block is not timed out, return it
return Ok(Some(local_info));
}
}
}

// The last locally accepted block is timed out, get the last globally accepted block
signer_db
.get_last_globally_accepted_block(consensus_hash)
.map_err(|e| ClientError::InvalidResponse(e.to_string()))
Expand Down
6 changes: 3 additions & 3 deletions testnet/stacks-node/src/tests/nakamoto_integrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6543,10 +6543,10 @@ fn signer_chainstate() {
valid: Some(true),
signed_over: true,
proposed_time: get_epoch_time_secs(),
signed_self: None,
signed_group: None,
signed_self: Some(get_epoch_time_secs()),
signed_group: Some(get_epoch_time_secs()),
ext: ExtraBlockInfo::None,
state: BlockState::Unprocessed,
state: BlockState::GloballyAccepted,
})
.unwrap();

Expand Down

0 comments on commit 0fbe07f

Please sign in to comment.