Fix to_pod storage trie value decoding (#10368)

This commit is contained in:
Wei Tang 2019-02-22 14:00:20 +01:00 committed by soc1c
parent 4311d43497
commit 9ad71b7baa

View File

@ -1020,7 +1020,7 @@ impl<B: Backend> State<B> {
let trie = self.factories.trie.readonly(accountdb, &root)?; let trie = self.factories.trie.readonly(accountdb, &root)?;
for o_kv in trie.iter()? { for o_kv in trie.iter()? {
if let Ok((key, val)) = o_kv { if let Ok((key, val)) = o_kv {
pod_storage.insert(key[..].into(), U256::from(&val[..]).into()); pod_storage.insert(key[..].into(), rlp::decode::<U256>(&val[..]).expect("Decoded from trie which was encoded from the same type; qed").into());
} }
} }