Backport 4844 and 4845
This commit is contained in:
@@ -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"))?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user