mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-24 13:37:59 +00:00
BlockId removal refactor: Backend::state_at (#1760)
* BlockId removal refactor: Backend::state_at
* corrected
* update lockfile for {"substrate", "polkadot"}
Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
e695dd905d
commit
25811e427d
@@ -180,8 +180,7 @@ where
|
||||
relay_parent: PHash,
|
||||
key: &[u8],
|
||||
) -> RelayChainResult<Option<StorageValue>> {
|
||||
let block_id = BlockId::Hash(relay_parent);
|
||||
let state = self.backend.state_at(block_id)?;
|
||||
let state = self.backend.state_at(&relay_parent)?;
|
||||
state.storage(key).map_err(RelayChainError::GenericError)
|
||||
}
|
||||
|
||||
@@ -190,8 +189,7 @@ where
|
||||
relay_parent: PHash,
|
||||
relevant_keys: &Vec<Vec<u8>>,
|
||||
) -> RelayChainResult<StorageProof> {
|
||||
let block_id = BlockId::Hash(relay_parent);
|
||||
let state_backend = self.backend.state_at(block_id)?;
|
||||
let state_backend = self.backend.state_at(&relay_parent)?;
|
||||
|
||||
sp_state_machine::prove_read(state_backend, relevant_keys)
|
||||
.map_err(RelayChainError::StateMachineError)
|
||||
|
||||
Reference in New Issue
Block a user