chore: update to latest nightly (#1398)

This commit is contained in:
Reisen 2024-03-27 11:27:24 +00:00 committed by GitHub
parent cf16fa3211
commit d66c00f84a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 953 additions and 844 deletions

1782
hermes/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
[toolchain] [toolchain]
channel = "nightly-2023-07-23" channel = "nightly-2024-03-26"

View File

@ -14,7 +14,7 @@ use {
ensure, ensure,
Result, Result,
}, },
chrono::NaiveDateTime, chrono::DateTime,
futures::StreamExt, futures::StreamExt,
proto::spy::v1::{ proto::spy::v1::{
filter_entry::Filter, filter_entry::Filter,
@ -200,9 +200,11 @@ pub async fn process_message(state: Arc<State>, vaa_bytes: Vec<u8>) -> Result<()
let vaa = serde_wormhole::from_slice::<Vaa<&RawMessage>>(&vaa_bytes)?; let vaa = serde_wormhole::from_slice::<Vaa<&RawMessage>>(&vaa_bytes)?;
// Log VAA Processing. // Log VAA Processing.
let vaa_timestamp = NaiveDateTime::from_timestamp_opt(vaa.timestamp as i64, 0); let vaa_timestamp = DateTime::from_timestamp(vaa.timestamp as i64, 0)
let vaa_timestamp = vaa_timestamp.unwrap(); .ok_or(anyhow!("Failed to parse VAA Tiestamp"))?
let vaa_timestamp = vaa_timestamp.format("%Y-%m-%dT%H:%M:%S.%fZ").to_string(); .format("%Y-%m-%dT%H:%M:%S.%fZ")
.to_string();
let slot = match WormholeMessage::try_from_bytes(vaa.payload)?.payload { let slot = match WormholeMessage::try_from_bytes(vaa.payload)?.payload {
WormholePayload::Merkle(proof) => proof.slot, WormholePayload::Merkle(proof) => proof.slot,
}; };

View File

@ -137,7 +137,8 @@ async fn retrieve_message_state(
// Get the first element that is greater than or equal to the lookup time. // Get the first element that is greater than or equal to the lookup time.
key_cache key_cache
.lower_bound(Bound::Included(&lookup_time)) .lower_bound(Bound::Included(&lookup_time))
.value() .peek_next()
.map(|(_, v)| v)
.cloned() .cloned()
} }
RequestTime::AtSlot(slot) => { RequestTime::AtSlot(slot) => {