File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,13 @@ impl<T: Config> Pallet<T> {
392
392
let mut last_stored_round = LastStoredRound :: < T > :: get ( ) ;
393
393
let latest_pulse_body = Self :: fetch_drand_latest ( ) . map_err ( |_| "Failed to query drand" ) ?;
394
394
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
+ } ) ?;
396
402
let latest_pulse = latest_unbounded_pulse
397
403
. try_into_pulse ( )
398
404
. map_err ( |_| "Drand: Received pulse contains invalid data" ) ?;
@@ -417,7 +423,14 @@ impl<T: Config> Pallet<T> {
417
423
let pulse_body = Self :: fetch_drand_by_round ( round)
418
424
. map_err ( |_| "Drand: Failed to query drand for round" ) ?;
419
425
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
+ } ) ?;
421
434
let pulse = unbounded_pulse
422
435
. try_into_pulse ( )
423
436
. map_err ( |_| "Drand: Received pulse contains invalid data" ) ?;
You can’t perform that action at this time.
0 commit comments