Skip to content

Commit

Permalink
Merge pull request #18 from goerli/clique-voting
Browse files Browse the repository at this point in the history
Fixes for broken spec code, sync speedup
  • Loading branch information
thefallentree authored Nov 19, 2018
2 parents 39c1266 + c3eae20 commit 6c0c97c
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions ethcore/src/engines/clique/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,23 @@ impl Clique {
//length of signers must be greater than 1
//

let epoch_length: u64 = 30;
trace!(target: "engine", "epoch length: {}, period: {}", our_params.epoch, our_params.period);
let snapshot = SignerSnapshot {
bn: 0,
signers: vec![],
epoch_length: epoch_length,
epoch_length: our_params.epoch,
votes: HashMap::<Address, (bool, Address)>::new(),
};

let engine = Arc::new(
Clique {
client: RwLock::new(None),
signer: Default::default(),
//signers: RwLock::new(Default::default()),
snapshot: RwLock::new(Some(snapshot)),
machine: machine,
step_service: IoService::<Duration>::start()?,
epoch_length: epoch_length, //our_params.epoch, TODO: Fix this
period: 5, // our_params.period,
epoch_length: our_params.epoch,
period: our_params.period,
});


Expand Down Expand Up @@ -277,12 +276,6 @@ impl Engine<EthereumMachine> for Clique {

Ok(())
}
fn ancestry_actions(&self, _header: &Header, ancestry: &mut Iterator<Item=ExtendedHeader>) -> Vec<AncestryAction> {
ancestry.map(|h| {
trace!(target: "engine", "ancestry encountered ");
AncestryAction::MarkFinalized(h.header.hash())
}).collect::<Vec<AncestryAction>>().to_vec()
}

fn executive_author (&self, header: &Header) -> Address {
trace!(target: "engine", "called executive_author for block {}", header.number());
Expand Down

0 comments on commit 6c0c97c

Please sign in to comment.