From 2df03b2e0a1d5631ff50a739d489046d4cb4cadd Mon Sep 17 00:00:00 2001 From: peilun-conflux <48905552+peilun-conflux@users.noreply.github.com> Date: Tue, 28 Apr 2020 22:52:43 +0800 Subject: [PATCH] Demote peers for invalid status. (#1370) 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. --- core/src/sync/synchronization_protocol_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/sync/synchronization_protocol_handler.rs b/core/src/sync/synchronization_protocol_handler.rs index 1db1368a86..8af9560a39 100644 --- a/core/src/sync/synchronization_protocol_handler.rs +++ b/core/src/sync/synchronization_protocol_handler.rs @@ -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