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:
Michal Kucharczyk
2022-10-19 12:13:57 +02:00
committed by GitHub
parent e3b269ab0f
commit 1d5aa47bee
5 changed files with 57 additions and 67 deletions
+2 -2
View File
@@ -345,7 +345,7 @@ where
self.block_or_best(block)
.and_then(|block| {
self.client
.read_proof(&BlockId::Hash(block), &mut keys.iter().map(|key| key.0.as_ref()))
.read_proof(&block, &mut keys.iter().map(|key| key.0.as_ref()))
.map(|proof| proof.iter_nodes().map(|node| node.into()).collect())
.map(|proof| ReadProof { at: block, proof })
})
@@ -494,7 +494,7 @@ where
};
self.client
.read_child_proof(
&BlockId::Hash(block),
&block,
&child_info,
&mut keys.iter().map(|key| key.0.as_ref()),
)