Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
dont close block if is_invalid (#2572)
Browse files Browse the repository at this point in the history
  • Loading branch information
keorn authored and arkpar committed Oct 11, 2016
1 parent 303654d commit 5e24a35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ethcore/src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ impl Client {
for block in blocks {
let header = &block.header;
let is_invalid = invalid_blocks.contains(header.parent_hash());
if let (false, Ok(closed_block)) = (is_invalid, self.check_and_close_block(&block)) {
if is_invalid {
invalid_blocks.insert(header.hash());
continue;
}
if let Ok(closed_block) = self.check_and_close_block(&block) {
imported_blocks.push(header.hash());

let route = self.commit_block(closed_block, &header.hash(), &block.bytes);
Expand Down

0 comments on commit 5e24a35

Please sign in to comment.