Skip to content

Commit

Permalink
squash this. delete some trace statements, trigger ci restart
Browse files Browse the repository at this point in the history
  • Loading branch information
jwasinger committed Jan 7, 2019
1 parent 30cad03 commit 7796762
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ethcore/src/engines/clique/signer_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ impl CliqueState {
/// Apply an new header
pub fn apply(&mut self, header: &Header) -> Result<(), Error> {
let db = self.states_by_hash.borrow_mut();
trace!(target: "engine", "applying header {}", header.hash());

// make sure current hash is not in the db
match db.get_mut(header.parent_hash()).cloned() {
Expand All @@ -128,7 +127,6 @@ impl CliqueState {
new_state.recent_signers.pop_back();
}

trace!(target: "engine", "inserting {} {:?}", header.hash(), &new_state);
db.insert(header.hash(), new_state.clone());
Ok(())
}
Expand Down Expand Up @@ -204,7 +202,6 @@ fn extract_signers(header: &Header) -> Result<Vec<Address>, Error> {
// NOTE: base on geth implmentation , signers list area always sorted to ascending order.
signers_list.sort();

trace!(target: "engine", "extracted signers {:?}", &signers_list);
Ok(signers_list)
}

Expand Down Expand Up @@ -261,14 +258,10 @@ fn clique_hash(h: &Header) -> U256 {
/// Apply header to the state, used in block sealing and external block import
fn process_header(header: &Header, state: &mut SnapshotState, epoch_length: u64) -> Result<Address, Error> {

trace!(target: "engine", "called process_header for {}", header.number());

if header.extra_data().len() < SIGNER_VANITY_LENGTH as usize + SIGNER_SIG_LENGTH as usize {
return Err(From::from(format!("header extra data was too small: {}", header.extra_data().len())));
}

trace!(target: "engine", "extra_data field has valid length: {:?}", header.extra_data());

let creator = public_to_address(&recover(header).unwrap()).clone();

match state.get_signer_authorization(header.number(), &creator) {
Expand Down

0 comments on commit 7796762

Please sign in to comment.