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>()
.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
.clone()
@ -349,7 +356,7 @@ mod olivia_api {
let 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 {
id: OracleEventId(data.id),

Loading…
Cancel
Save