Skip to content

Commit

Permalink
report rejection step in miner log, ensure signe_test shutdown in int…
Browse files Browse the repository at this point in the history
…egration test
  • Loading branch information
rdeioris committed Jan 31, 2025
1 parent eb883ee commit fe429f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions testnet/stacks-node/src/nakamoto_node/signer_coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ impl SignerCoordinator {

if rejections != block_status.total_reject_weight as u64 {
rejections = block_status.total_reject_weight as u64;
let rejections_timeout_tuple = self
let (rejections_step, new_rejections_timeout) = self
.block_rejection_timeout_steps
.range((Included(0), Included(rejections)))
.last()
Expand All @@ -399,10 +399,11 @@ impl SignerCoordinator {
"Invalid rejection timeout step function definition".into(),
)
})?;
rejections_timeout = rejections_timeout_tuple.1;
rejections_timeout = new_rejections_timeout;
info!("Number of received rejections updated, resetting timeout";
"rejections" => rejections,
"rejections_timeout" => rejections_timeout.as_secs(),
"rejections_step" => rejections_step,
"rejections_threshold" => self.total_weight.saturating_sub(self.weight_threshold));

Counters::set(
Expand Down
3 changes: 3 additions & 0 deletions testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8111,6 +8111,9 @@ fn block_validation_check_rejection_timeout_heuristic() {
// reset reject/ignore
TEST_REJECT_ALL_BLOCK_PROPOSAL.set(vec![]);
TEST_IGNORE_ALL_BLOCK_PROPOSALS.set(vec![]);

info!("------------------------- Shutdown -------------------------");
signer_test.shutdown();
}

/// Test scenario:
Expand Down

0 comments on commit fe429f4

Please sign in to comment.