mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-04 08:07:24 +00:00
transactional: Wrap pallet::calls directly in storage layers (#11927)
* transactional: Wrap `pallet::calls` directly in storage layers Before this pr we only wrapped `pallet::calls` into storage layers when executing the calls with `dispatch`. This pr is solving that by wrapping each call function inside a storage layer. * Teach `BasicExternalities` transactions support * Fix crates * FMT * Fix benchmarking tests * Use correct span * Support old decl macros * Fix test * Apply suggestions from code review Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update frame/state-trie-migration/src/lib.rs * Update frame/state-trie-migration/src/lib.rs * Update frame/state-trie-migration/src/lib.rs * Feedback * Apply suggestions from code review Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: cheme <emericchevalier.pro@gmail.com>
This commit is contained in:
@@ -638,6 +638,21 @@ impl OverlayedChanges {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl From<sp_core::storage::Storage> for OverlayedChanges {
|
||||
fn from(storage: sp_core::storage::Storage) -> Self {
|
||||
Self {
|
||||
top: storage.top.into(),
|
||||
children: storage
|
||||
.children_default
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, (v.data.into(), v.child_info)))
|
||||
.collect(),
|
||||
..Default::default()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
fn retain_map<K, V, F>(map: &mut Map<K, V>, f: F)
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user