mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 07:25:44 +00:00
Changes tries: support forks (#950)
* forks support in changes trie storage * moved convert_hash to primitives * optimize ChangesTrieRootsStorage::root when anchor is canonicalized
This commit is contained in:
committed by
Gav Wood
parent
037f9dde10
commit
6e3c56c135
@@ -157,9 +157,9 @@ pub fn child_storage_root(storage_key: &[u8]) -> Option<Vec<u8>> {
|
||||
}
|
||||
|
||||
/// "Commit" all existing operations and get the resultant storage change root.
|
||||
pub fn storage_changes_root(block: u64) -> Option<H256> {
|
||||
pub fn storage_changes_root(parent_hash: [u8; 32], parent_num: u64) -> Option<H256> {
|
||||
ext::with(|ext|
|
||||
ext.storage_changes_root(block)
|
||||
ext.storage_changes_root(parent_hash.into(), parent_num)
|
||||
).unwrap_or(None)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user