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:
Michal Kucharczyk
2023-02-16 23:34:00 +01:00
committed by GitHub
parent 2e4ea01311
commit 36480b158d
7 changed files with 14 additions and 19 deletions
+3 -3
View File
@@ -587,7 +587,7 @@ mod tests {
use sp_keyring::AccountKeyring;
use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
use sp_runtime::{
generic::{BlockId, Digest, Era, SignedPayload},
generic::{Digest, Era, SignedPayload},
key_types::BABE,
traits::{Block as BlockT, Header as HeaderT, IdentifyAccount, Verify},
RuntimeAppPublic,
@@ -754,9 +754,9 @@ mod tests {
let to: Address = AccountPublic::from(bob.public()).into_account().into();
let from: Address = AccountPublic::from(charlie.public()).into_account().into();
let genesis_hash = service.client().block_hash(0).unwrap().unwrap();
let best_block_id = BlockId::number(service.client().chain_info().best_number);
let best_hash = service.client().chain_info().best_hash;
let (spec_version, transaction_version) = {
let version = service.client().runtime_version_at(&best_block_id).unwrap();
let version = service.client().runtime_version_at(best_hash).unwrap();
(version.spec_version, version.transaction_version)
};
let signer = charlie.clone();