Skip to content

Commit

Permalink
fix: sync header verify
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsoledad committed Dec 18, 2018
1 parent 8e547e3 commit 366f077
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions sync/src/synchronizer/headers_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,6 @@ where
}

fn is_continuous(&self, headers: &[Header]) -> bool {
debug!(
target: "sync",
"headers\n {:?}",
headers
.iter()
.map(|h| format!(
"{} hash({}) parent({})",
h.number(),
h.hash(),
h.parent_hash()
)).collect::<Vec<_>>()
);
for window in headers.windows(2) {
if let [parent, header] = &window {
if header.parent_hash() != &parent.hash() {
Expand Down Expand Up @@ -336,6 +324,7 @@ where
}
error => {
debug!(target: "sync", "HeadersProcess accept {:?} {:?}", self.header.number(), error);
state.invalid(Some(ValidationError::Verify(error)));
}
})
}
Expand Down

0 comments on commit 366f077

Please sign in to comment.