Skip to content

Commit

Permalink
Revert "report_malicious test moved to verify_block_basic"
Browse files Browse the repository at this point in the history
This reverts commit 8e59221.
  • Loading branch information
vkomenda committed May 24, 2019
1 parent 8e59221 commit feba22f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions ethcore/src/engines/authority_round/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1361,14 +1361,6 @@ impl Engine<EthereumMachine> for AuthorityRound {
)));
}

// TEST CODE: DO NOT MERGE INTO ANY PRODUCTION BRANCH!
if let Some(addr) = self.report_malicious.get(&header.number()) {
warn!(target: "engine", "Reporting {} as malicious FOR TESTING PURPOSES.", addr);
self.validators.report_malicious(
addr, self.epoch_set(header)?.1, header.number(), Default::default()
);
}

match verify_timestamp(&self.step.inner, header_step(header, self.empty_steps_transition)?) {
Err(BlockError::InvalidSeal) => {
// This check runs in Phase 1 where there is no guarantee that the parent block is
Expand Down Expand Up @@ -1402,6 +1394,7 @@ impl Engine<EthereumMachine> for AuthorityRound {
if step == parent_step
|| (header.number() >= self.validate_step_transition && step <= parent_step) {
trace!(target: "engine", "Multiple blocks proposed for step {}.", parent_step);

self.validators.report_malicious(header.author(), set_number, header.number(), Default::default());
Err(EngineError::DoubleVote(*header.author()))?;
}
Expand Down

0 comments on commit feba22f

Please sign in to comment.