Backport 4844 and 4845

This commit is contained in:
Jon Häggblad
2024-09-09 16:19:04 +02:00
parent f3fcef60c3
commit babc84779c
2 changed files with 4 additions and 5 deletions
+3 -1
View File
@@ -415,6 +415,8 @@ pub struct HealthRequest {
#[cfg(test)]
mod tests {
use time::macros::datetime;
use super::*;
use std::net::{Ipv4Addr, Ipv6Addr};
use std::str::FromStr;
@@ -432,7 +434,7 @@ mod tests {
reply_to_hops: None,
reply_to_avg_mix_delays: None,
buffer_timeout: None,
timestamp: OffsetDateTime::now_utc(),
timestamp: datetime!(2024-01-01 12:59:59.5 UTC),
},
signature: None,
}
@@ -131,8 +131,5 @@ pub async fn verify(
let message_as_bytes = message.into_bytes();
Ok(verifying_key
.verify(&message_as_bytes, &signature)
.map_err(|e| {
log::error!(">>> Verification failed, wrong signature");
e
})?)
.inspect_err(|_| log::error!(">>> Verification failed, wrong signature"))?)
}