mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Extract search of digest item into Digest::log() function (#874)
* Digest::log fn * change DigestItem::log impl
This commit is contained in:
committed by
Gav Wood
parent
187c232629
commit
200a716a1a
@@ -374,9 +374,7 @@ impl<Block: BlockT> state_machine::ChangesTrieRootsStorage<Blake2Hasher> for DbC
|
||||
.map(Some),
|
||||
None => Ok(None)
|
||||
})?
|
||||
.and_then(|header| header.digest().logs().iter()
|
||||
.find(|log| log.as_changes_trie_root().is_some())
|
||||
.and_then(DigestItem::as_changes_trie_root)
|
||||
.and_then(|header| header.digest().log(DigestItem::as_changes_trie_root)
|
||||
.map(|root| H256::from_slice(root.as_ref()))))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user