Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fixes errors after master rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Dec 20, 2018
1 parent f906a35 commit 344d4f0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions core/consensus/aura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,12 @@ impl<B: Block, C, E, MakeInherent, Inherent> Verifier<B> for AuraVerifier<C, E,
// actually matches the slot set in the seal.
if let Some(inner_body) = body.take() {
let inherent = (self.make_inherent)(timestamp_now, slot_num);
let block = Block::new(pre_header.clone(), inner_body);
let block: B = Block::new(pre_header.clone(), inner_body);

let inherent_res = self.client.runtime_api().check_inherents(
&BlockId::Hash(parent_hash),
&block,
&inherent,
block.clone(),
inherent,
).map_err(|e| format!("{:?}", e))?;

match inherent_res {
Expand Down
16 changes: 11 additions & 5 deletions core/state-machine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub fn execute_using_consensus_failure_handler<
manager: ExecutionManager<Handler>,
compute_tx: bool,
mut native_call: Option<NC>,
) -> Result<(NativeOrEncoded<R>, B::Transaction, Option<MemoryDB<H>>), Box<Error>>
) -> Result<(NativeOrEncoded<R>, Option<B::Transaction>, Option<MemoryDB<H>>), Box<Error>>
where
H: Hasher,
Exec: CodeExecutor<H>,
Expand Down Expand Up @@ -469,7 +469,9 @@ where
H::Out: Ord + HeapSizeOf,
{
let proving_backend = proving_backend::ProvingBackend::new(trie_backend);
let (result, _, _) = execute_using_consensus_failure_handler::<H, _, changes_trie::InMemoryStorage<H>, _, _>(
let (result, _, _) = execute_using_consensus_failure_handler::
<H, _, changes_trie::InMemoryStorage<H>, _, _, NeverNativeValue, fn() -> NeverNativeValue>
(
&proving_backend,
None,
overlay,
Expand All @@ -478,9 +480,10 @@ where
call_data,
native_when_possible(),
false,
None,
)?;
let proof = proving_backend.extract_proof();
Ok((result, proof))
Ok((result.into_encoded(), proof))
}

/// Check execution proof, generated by `prove_execution` call.
Expand Down Expand Up @@ -514,7 +517,9 @@ where
Exec: CodeExecutor<H>,
H::Out: Ord + HeapSizeOf,
{
execute_using_consensus_failure_handler::<H, _, changes_trie::InMemoryStorage<H>, _, _>(
execute_using_consensus_failure_handler::
<H, _, changes_trie::InMemoryStorage<H>, _, _, NeverNativeValue, fn() -> NeverNativeValue>
(
trie_backend,
None,
overlay,
Expand All @@ -523,7 +528,8 @@ where
call_data,
native_when_possible(),
false,
).map(|(result, _, _)| result)
None,
).map(|(result, _, _)| result.into_encoded())
}

/// Generate storage read proof.
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 344d4f0

Please sign in to comment.