Skip to content

Commit bc079b3

Browse files
committed
do not try to update state machine for inactive reward cycle
1 parent db9d454 commit bc079b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stacks-signer/src/v0/signer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,10 @@ impl SignerTrait<SignerMessage> for Signer {
213213
return;
214214
}
215215

216-
self.local_state_machine.handle_pending_update(&self.signer_db, stacks_client, &self.proposal_config)
217-
.unwrap_or_else(|e| error!("{self}: failed to update local state machine for pending update"; "err" => ?e));
216+
if self.reward_cycle <= current_reward_cycle {
217+
self.local_state_machine.handle_pending_update(&self.signer_db, stacks_client, &self.proposal_config)
218+
.unwrap_or_else(|e| error!("{self}: failed to update local state machine for pending update"; "err" => ?e));
219+
}
218220

219221
match event {
220222
SignerEvent::BlockValidationResponse(block_validate_response) => {

0 commit comments

Comments
 (0)