Use ring crate to generate StatHashes when saving stateid/statehash

This commit is contained in:
Devin Ragotzy 2020-08-18 14:32:38 -04:00
parent c4f5a0a631
commit cb68bf9e0c
4 changed files with 15 additions and 10 deletions

View file

@ -94,5 +94,5 @@ pub fn common_elements(
pub fn deserialize<'de, T: serde::Deserialize<'de>>(val: &'de sled::IVec) -> Result<T, Error> {
serde_json::from_slice::<T>(val.as_ref())
.map_err(|_| Error::bad_database("PDU in db is invalid."))
.map_err(|_| Error::bad_database("Found invalid bytes as PDU in db."))
}