Skip to content

Commit

Permalink
add ban logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg committed Jan 21, 2023
1 parent 808995f commit 07d3afb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sync/src/tasks/block_sync_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ where
}
}
if block.id() == *BARNARD_HARD_FORK_HASH {
if let Some(peer) = peer_id {
warn!("[barnard hard fork] ban peer {}", peer);
self.peer_provider.ban_peer(peer, true);
}
return Err(format_err!("reject barnard hard fork block:{}", block.id()));
}
let apply_result = if self.skip_pow_verify {
Expand Down

0 comments on commit 07d3afb

Please sign in to comment.