Browse Source

Don't fail attestation sync just because it is not attested yet

refactor/no-log-handler
Thomas Eizinger 3 years ago
parent
commit
d2d4c216db
No known key found for this signature in database GPG Key ID: 651AC83A6C6C8B96
  1. 13
      daemon/src/oracle.rs

13
daemon/src/oracle.rs

@ -165,10 +165,17 @@ where
} }
}; };
let attestation = res let attestation = match res
.json::<Attestation>() .json::<Attestation>()
.await .await
.with_context(|| format!("Failed to decode body for event {}", event_id))?; .with_context(|| format!("Failed to decode body for event {}", event_id))
{
Ok(attestation) => attestation,
Err(e) => {
tracing::debug!("{:#}", e);
continue;
}
};
self.cfd_actor_address self.cfd_actor_address
.clone() .clone()
@ -349,7 +356,7 @@ mod olivia_api {
let data = let data =
serde_json::from_str::<AnnouncementData>(&response.announcement.oracle_event.data)?; serde_json::from_str::<AnnouncementData>(&response.announcement.oracle_event.data)?;
let attestation = response.attestation.context("Missing attestation")?; let attestation = response.attestation.context("attestation missing")?;
Ok(Self { Ok(Self {
id: OracleEventId(data.id), id: OracleEventId(data.id),

Loading…
Cancel
Save