mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
BlockId removal: refactor: ProofProvider (#12519)
* BlockId removal: refactor: ProofProvider It changes the arguments of methods of `ProofProvider` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * LightClientRequestHandler: excessive BlockIdTo bound removed * imports cleanup * formatting * args tyeps cleanup
This commit is contained in:
committed by
GitHub
parent
e3b269ab0f
commit
1d5aa47bee
@@ -32,7 +32,7 @@ use sc_network_common::{
|
||||
config::ProtocolId,
|
||||
request_responses::{IncomingRequest, OutgoingResponse, ProtocolConfig},
|
||||
};
|
||||
use sp_runtime::{generic::BlockId, traits::Block as BlockT};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use std::{
|
||||
hash::{Hash, Hasher},
|
||||
sync::Arc,
|
||||
@@ -205,14 +205,14 @@ where
|
||||
|
||||
if !request.no_proof {
|
||||
let (proof, _count) = self.client.read_proof_collection(
|
||||
&BlockId::hash(block),
|
||||
&block,
|
||||
request.start.as_slice(),
|
||||
MAX_RESPONSE_BYTES,
|
||||
)?;
|
||||
response.proof = proof.encode();
|
||||
} else {
|
||||
let entries = self.client.storage_collection(
|
||||
&BlockId::hash(block),
|
||||
&block,
|
||||
request.start.as_slice(),
|
||||
MAX_RESPONSE_BYTES,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user