Skip to content

Commit

Permalink
add time buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Priceless-P authored and fi3 committed Dec 17, 2024
1 parent 97ab3c4 commit 39fc17d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/v2/noise-sv2/src/signature_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl SignatureNoiseMessage {
.duration_since(SystemTime::UNIX_EPOCH)
.unwrap()
.as_secs() as u32;
if self.valid_from <= now && self.not_valid_after >= now {
if (self.valid_from - 10) <= now && (self.not_valid_after + 10) >= now {
let secp = Secp256k1::verification_only();
let (m, s) = self.split();
// m = SHA-256(version || valid_from || not_valid_after || server_static_key)
Expand Down

0 comments on commit 39fc17d

Please sign in to comment.