diff --git a/pallets/parachain-system/src/relay_state_snapshot.rs b/pallets/parachain-system/src/relay_state_snapshot.rs index 39f86a04a23..81f7a627fc0 100644 --- a/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/pallets/parachain-system/src/relay_state_snapshot.rs @@ -113,6 +113,11 @@ where .ok_or(ReadEntryErr::Absent) } +/// Read an optional entry given by the key and try to decode it. +/// Returns `None` if the value specified by the key according to the proof is empty. +/// +/// Returns `Err` in case the backend can't return the value under the specific key (likely due to +/// a malformed proof) or if the value couldn't be decoded. fn read_optional_entry(backend: &B, key: &[u8]) -> Result, ReadEntryErr> where T: Decode,