mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Fix for miscalculation of storage root (#2285)
This commit is contained in:
@@ -367,7 +367,7 @@ pub fn set_storage(key: &[u8], value: &[u8]) {
|
||||
pub fn set_child_storage(storage_key: &[u8], key: &[u8], value: &[u8]) {
|
||||
unsafe {
|
||||
ext_set_child_storage.get()(
|
||||
storage_key.as_ptr(), key.len() as u32,
|
||||
storage_key.as_ptr(), storage_key.len() as u32,
|
||||
key.as_ptr(), key.len() as u32,
|
||||
value.as_ptr(), value.len() as u32
|
||||
);
|
||||
|
||||
@@ -297,7 +297,8 @@ where
|
||||
}
|
||||
|
||||
let mut transaction = B::Transaction::default();
|
||||
let child_storage_keys: Vec<_> = self.overlay.prospective.children.keys().cloned().collect();
|
||||
let child_storage_keys: std::collections::BTreeSet<_> = self.overlay.prospective.children.keys().cloned()
|
||||
.chain(self.overlay.committed.children.keys().cloned()).collect();
|
||||
|
||||
for key in child_storage_keys {
|
||||
let (_, t) = self.child_storage_root_transaction(&key);
|
||||
|
||||
Reference in New Issue
Block a user