distance create_distance_inherent_data_provider should be allowed to fail
Currently, our create_distance_inherent_data_provider
function can fail for multiple reasons:
- fail of
sc_consensus_manual_seal::consensus::timestamp::SlotTimestampProvider::new_babe()
- fail of
dc_distance::create_distance_inherent_data_provider()
The first one is acceptable, we should not produce block if we are not able to include time in it. The second one is less, because it depends on storage items with hardcoded keys. So we should not raise error of Result<sp_distance::InherentDataProvider<IdtyIndex>, sc_client_api::blockchain::Error>
in this case. Simply return InherentDataProvider
with None
as computation_result
.t
Edited by Hugo Trentesaux