Skip to content

Commit

Permalink
chore(signer): remove check to update nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-wright committed Jun 1, 2024
1 parent 5fd83e8 commit 3af8f91
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions core/signer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,11 @@ impl SignerState {
payload: update_payload,
};
tx.update_request = update_request;
} else if tx.update_request.payload.nonce != self.next_nonce {
// Note: with the change to using the increment nonce txn, this check
// should not be necessary anymore.
tx.update_request.payload.nonce = self.next_nonce;

let digest = tx.update_request.payload.to_digest();
let signature = self.node_secret_key.sign(&digest);
tx.update_request.signature = signature.into();
} else {
// Since we just replace transactions that we don't resend with an
// increment nonce transaction, we don't have to update the nonce of the
// transactions we try to resend.
assert_eq!(tx.update_request.payload.nonce, self.next_nonce);
}
// Update timestamp to resending time.
tx.timestamp = SystemTime::now();
Expand Down

0 comments on commit 3af8f91

Please sign in to comment.