serve epoch signals over network and check them

This commit is contained in:
Robert Habermeier
2017-08-23 15:37:35 +02:00
parent 7f3e718851
commit 2ff3dff6ea
16 changed files with 298 additions and 30 deletions

View File

@@ -121,7 +121,7 @@ pub type Headers<'a> = Fn(H256) -> Option<Header> + 'a;
pub type PendingTransitionStore<'a> = Fn(H256) -> Option<PendingTransition> + 'a;
/// Proof dependent on state.
pub trait StateDependentProof {
pub trait StateDependentProof: Send + Sync {
/// Generate a proof, given the state.
fn generate_proof(&self, caller: &Call) -> Result<Vec<u8>, String>;
/// Check a proof generated elsewhere (potentially by a peer).
@@ -135,7 +135,7 @@ pub enum Proof {
/// Known proof (extracted from signal)
Known(Vec<u8>),
/// State dependent proof.
WithState(Box<StateDependentProof>),
WithState(Arc<StateDependentProof>),
}
/// Generated epoch verifier.