mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
BlockId removal: CallApiAt::state_at (#13394)
* BlockId removal: CallApiAt::state_at It changes the arguments of: - `CallApiAt::state_at`, - `Client::code_at`, - `Client::state_at` from: `BlockId<Block>` to: `Block::Hash` * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> --------- Co-authored-by: Bastian Köcher <git@kchr.de> Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
0669b8bb05
commit
2e4ea01311
@@ -147,13 +147,12 @@ fn record_proof_works() {
|
||||
.set_execution_strategy(ExecutionStrategy::Both)
|
||||
.build_with_longest_chain();
|
||||
|
||||
let block_id = BlockId::Number(client.chain_info().best_number);
|
||||
let storage_root =
|
||||
*futures::executor::block_on(longest_chain.best_chain()).unwrap().state_root();
|
||||
|
||||
let runtime_code = sp_core::traits::RuntimeCode {
|
||||
code_fetcher: &sp_core::traits::WrappedRuntimeCode(
|
||||
client.code_at(&block_id).unwrap().into(),
|
||||
client.code_at(client.chain_info().best_hash).unwrap().into(),
|
||||
),
|
||||
hash: vec![1],
|
||||
heap_pages: None,
|
||||
@@ -167,6 +166,7 @@ fn record_proof_works() {
|
||||
}
|
||||
.into_signed_tx();
|
||||
|
||||
let block_id = BlockId::Hash(client.chain_info().best_hash);
|
||||
// Build the block and record proof
|
||||
let mut builder = client
|
||||
.new_block_at(&block_id, Default::default(), true)
|
||||
|
||||
Reference in New Issue
Block a user