mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Access child storage over RPC. (#2586)
* Access child storage over RPC. * Address review grumbles. * Test happy case in child_storage rpc. * Remove stray printlns * Fix line widths. * Bump runtime again. * Fix genesis storage root calculation for light clients. * Don't pass values to full_storage_root child_delta.
This commit is contained in:
committed by
DemiMarie-parity
parent
a827869dfb
commit
98de97e1d9
@@ -102,12 +102,32 @@ impl BuildStorage for StorageOverlay {
|
||||
fn build_storage(self) -> Result<(StorageOverlay, ChildrenStorageOverlay), String> {
|
||||
Ok((self, Default::default()))
|
||||
}
|
||||
fn assimilate_storage(self, storage: &mut StorageOverlay, _child_storage: &mut ChildrenStorageOverlay) -> Result<(), String> {
|
||||
fn assimilate_storage(
|
||||
self,
|
||||
storage: &mut StorageOverlay,
|
||||
_child_storage: &mut ChildrenStorageOverlay
|
||||
) -> Result<(), String> {
|
||||
storage.extend(self);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
impl BuildStorage for (StorageOverlay, ChildrenStorageOverlay) {
|
||||
fn build_storage(self) -> Result<(StorageOverlay, ChildrenStorageOverlay), String> {
|
||||
Ok(self)
|
||||
}
|
||||
fn assimilate_storage(
|
||||
self,
|
||||
storage: &mut StorageOverlay,
|
||||
child_storage: &mut ChildrenStorageOverlay
|
||||
)-> Result<(), String> {
|
||||
storage.extend(self.0);
|
||||
child_storage.extend(self.1);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// Consensus engine unique ID.
|
||||
pub type ConsensusEngineId = [u8; 4];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user