define context trait and initialize statement table

This commit is contained in:
Robert Habermeier
2018-01-03 17:06:04 +01:00
parent f2cbae5948
commit acca871d20
6 changed files with 235 additions and 25 deletions
@@ -104,13 +104,13 @@ impl Context for TestContext {
type ValidatorId = ValidatorId;
type Signature = Signature;
type RoundTimeout = Box<Future<Item=(), Error=Error>>;
type Proposal = FutureResult<Candidate, Error>;
type CreateProposal = FutureResult<Candidate, Error>;
fn local_id(&self) -> ValidatorId {
self.local_id.clone()
}
fn proposal(&self) -> Self::Proposal {
fn proposal(&self) -> Self::CreateProposal {
let proposal = {
let mut p = self.proposal.lock().unwrap();
let x = *p;