Skip to content

Commit 83af209

Browse files
committed
Merge remote-tracking branch 'origin/devnet-ready' into feat/batch-set-weights
2 parents cc76060 + 25758dc commit 83af209

File tree

3 files changed

+142
-82
lines changed

3 files changed

+142
-82
lines changed

chainspecs/plain_spec_devnet.json

Lines changed: 36 additions & 27 deletions
Large diffs are not rendered by default.

chainspecs/raw_spec_devnet.json

Lines changed: 91 additions & 53 deletions
Large diffs are not rendered by default.

pallets/drand/src/lib.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,13 @@ impl<T: Config> Pallet<T> {
392392
let mut last_stored_round = LastStoredRound::<T>::get();
393393
let latest_pulse_body = Self::fetch_drand_latest().map_err(|_| "Failed to query drand")?;
394394
let latest_unbounded_pulse: DrandResponseBody = serde_json::from_str(&latest_pulse_body)
395-
.map_err(|_| "Drand: Failed to serialize response body to pulse")?;
395+
.map_err(|_| {
396+
log::warn!(
397+
"Drand: Response that failed to deserialize: {}",
398+
latest_pulse_body
399+
);
400+
"Drand: Failed to serialize response body to pulse"
401+
})?;
396402
let latest_pulse = latest_unbounded_pulse
397403
.try_into_pulse()
398404
.map_err(|_| "Drand: Received pulse contains invalid data")?;
@@ -417,7 +423,14 @@ impl<T: Config> Pallet<T> {
417423
let pulse_body = Self::fetch_drand_by_round(round)
418424
.map_err(|_| "Drand: Failed to query drand for round")?;
419425
let unbounded_pulse: DrandResponseBody = serde_json::from_str(&pulse_body)
420-
.map_err(|_| "Drand: Failed to serialize response body to pulse")?;
426+
.map_err(|_| {
427+
log::warn!(
428+
"Drand: Response that failed to deserialize for round {}: {}",
429+
round,
430+
pulse_body
431+
);
432+
"Drand: Failed to serialize response body to pulse"
433+
})?;
421434
let pulse = unbounded_pulse
422435
.try_into_pulse()
423436
.map_err(|_| "Drand: Received pulse contains invalid data")?;

0 commit comments

Comments
 (0)