Skip to content
Snippets Groups Projects
Commit 9123b87a authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

Merge branch 'hugo/fix-distance-inherent-provider' into tmp

parents 8e217477 eececc09
No related branches found
No related tags found
No related merge requests found
...@@ -504,6 +504,7 @@ where ...@@ -504,6 +504,7 @@ where
>( >(
&*client, parent, distance_dir, &babe_owner_keys.clone() &*client, parent, distance_dir, &babe_owner_keys.clone()
)?; )?;
// in case of manual sealing, the distance is forced to succeed
Ok((timestamp, babe, distance)) Ok((timestamp, babe, distance))
} }
}, },
...@@ -549,7 +550,17 @@ where ...@@ -549,7 +550,17 @@ where
FullBackend, FullBackend,
>( >(
&*client, parent, distance_dir, &babe_owner_keys.clone() &*client, parent, distance_dir, &babe_owner_keys.clone()
)?; );
// provides fallback when distance inherent data provider crashes
// (only when sealing is not manual)
let distance = match distance {
Ok(distance) => distance,
Err(e) => {
log::warn!("{:?}", e);
sp_distance::InherentDataProvider::new(None)
}
};
Ok((slot, timestamp, storage_proof, distance)) Ok((slot, timestamp, storage_proof, distance))
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment