Revert "Don't include :code by default in storage proofs (#5060)" (#5136)

This reverts commit 6ee39261c8.
This commit is contained in:
Arkadiy Paronyan
2020-03-05 10:55:05 +01:00
committed by GitHub
parent ff2a36d7cb
commit 9a1b3b53f2
31 changed files with 182 additions and 478 deletions
@@ -254,12 +254,13 @@ where
B: Block,
{
/// Construct a new light client handler.
pub fn new(
cfg: Config,
chain: Arc<dyn Client<B>>,
checker: Arc<dyn fetcher::FetchChecker<B>>,
peerset: sc_peerset::PeersetHandle,
) -> Self {
pub fn new
( cfg: Config
, chain: Arc<dyn Client<B>>
, checker: Arc<dyn fetcher::FetchChecker<B>>
, peerset: sc_peerset::PeersetHandle
) -> Self
{
LightClientHandler {
config: cfg,
chain,
@@ -424,8 +425,7 @@ where
log::trace!("remote call request from {} ({} at {:?})",
peer,
request.method,
request.block,
);
request.block);
let block = Decode::decode(&mut request.block.as_ref())?;
@@ -436,8 +436,7 @@ where
peer,
request.method,
request.block,
e,
);
e);
StorageProof::empty()
}
};
@@ -750,11 +750,7 @@ pub mod tests {
}
}
fn check_execution_proof(
&self,
_: &RemoteCallRequest<B::Header>,
_: StorageProof,
) -> ClientResult<Vec<u8>> {
fn check_execution_proof(&self, _: &RemoteCallRequest<B::Header>, _: StorageProof) -> ClientResult<Vec<u8>> {
match self.ok {
true => Ok(vec![42]),
false => Err(ClientError::Backend("Test error".into())),