diff --git a/benches/Cargo.toml b/benches/Cargo.toml index e196ee7ef..8d849a4f8 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -13,6 +13,7 @@ iai="0.1" mining_sv2 = { path = "../protocols/v2/subprotocols/mining", version = "^2.0.0" } roles_logic_sv2 = { path = "../protocols/v2/roles-logic-sv2", version = "^3.0.0" } framing_sv2 = { version = "3.0.0", path = "../protocols/v2/framing-sv2" } + serde = { version = "1.0.89", default-features = false, features = ["derive", "alloc"] } num-bigint = "0.4.3" num-traits = "0.2.15" diff --git a/protocols/v2/noise-sv2/src/signature_message.rs b/protocols/v2/noise-sv2/src/signature_message.rs index c82e4bd08..954e22b51 100644 --- a/protocols/v2/noise-sv2/src/signature_message.rs +++ b/protocols/v2/noise-sv2/src/signature_message.rs @@ -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)