Skip to content

Commit

Permalink
Demote peers for invalid status. (#1370)
Browse files Browse the repository at this point in the history
This may only happen if genesis hash or chain id does not match. In both
cases, we do not want to keep connecting this peer actively. We also should
not blacklist this peer because we just run different versions of
data now.
  • Loading branch information
peilun-conflux authored and Peilun Li committed May 7, 2020
1 parent 808e3cb commit 2df03b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/sync/synchronization_protocol_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ impl SynchronizationProtocolHandler {
op = Some(UpdateNodeOperation::Demotion)
}
ErrorKind::InvalidStatus(_) => {
op = Some(UpdateNodeOperation::Failure)
op = Some(UpdateNodeOperation::Demotion)
}
ErrorKind::InvalidMessageFormat => {
// TODO: Shall we blacklist a node when the message format is
Expand Down

0 comments on commit 2df03b2

Please sign in to comment.