mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
BlockId removal: Client::runtime_version_at (#13393)
* BlockId removal: Client::runtime_version_at It changes the arguments of `Client::runtime_version_at` from: `BlockId<Block>` to: `Block::Hash` * Apply suggestions from code review Co-authored-by: Anton <anton.kalyaev@gmail.com> --------- Co-authored-by: Anton <anton.kalyaev@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
2e4ea01311
commit
36480b158d
@@ -485,7 +485,7 @@ mod tests {
|
||||
)
|
||||
.expect("Creates a client");
|
||||
|
||||
let version = client.runtime_version_at(&BlockId::Number(0)).unwrap();
|
||||
let version = client.runtime_version_at(client.chain_info().genesis_hash).unwrap();
|
||||
|
||||
assert_eq!(SUBSTITUTE_SPEC_NAME, &*version.spec_name);
|
||||
}
|
||||
|
||||
@@ -491,8 +491,7 @@ where
|
||||
}
|
||||
|
||||
/// Get the RuntimeVersion at a given block.
|
||||
pub fn runtime_version_at(&self, id: &BlockId<Block>) -> sp_blockchain::Result<RuntimeVersion> {
|
||||
let hash = self.backend.blockchain().expect_block_hash_from_id(id)?;
|
||||
pub fn runtime_version_at(&self, hash: Block::Hash) -> sp_blockchain::Result<RuntimeVersion> {
|
||||
CallExecutor::runtime_version(&self.executor, hash)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user