mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
BlockId::Number refactor: trivial changes to BlockId::Hash (#12471)
* Trivial BlockId::Number => Hash * missed BlockId::Hash added
This commit is contained in:
committed by
GitHub
parent
8920b1c5b3
commit
09748f1b28
@@ -191,7 +191,7 @@ impl StorageCmd {
|
||||
B: BlockT + Debug,
|
||||
BA: ClientBackend<B>,
|
||||
{
|
||||
let block = BlockId::Number(client.usage_info().chain.best_number);
|
||||
let block = BlockId::Hash(client.usage_info().chain.best_hash);
|
||||
let empty_prefix = StorageKey(Vec::new());
|
||||
let mut keys = client.storage_keys(&block, &empty_prefix)?;
|
||||
let (mut rng, _) = new_rng(None);
|
||||
|
||||
@@ -41,7 +41,7 @@ impl StorageCmd {
|
||||
<<B as BlockT>::Header as HeaderT>::Number: From<u32>,
|
||||
{
|
||||
let mut record = BenchRecord::default();
|
||||
let block = BlockId::Number(client.usage_info().chain.best_number);
|
||||
let block = BlockId::Hash(client.usage_info().chain.best_hash);
|
||||
|
||||
info!("Preparing keys from block {}", block);
|
||||
// Load all keys and randomly shuffle them.
|
||||
|
||||
@@ -57,7 +57,7 @@ impl StorageCmd {
|
||||
// Store the time that it took to write each value.
|
||||
let mut record = BenchRecord::default();
|
||||
|
||||
let block = BlockId::Number(client.usage_info().chain.best_number);
|
||||
let block = BlockId::Hash(client.usage_info().chain.best_hash);
|
||||
let header = client.header(block)?.ok_or("Header not found")?;
|
||||
let original_root = *header.state_root();
|
||||
let trie = DbStateBuilder::<Block>::new(storage.clone(), original_root).build();
|
||||
|
||||
Reference in New Issue
Block a user