From 217da1f102ee2c237cdd9edcd5b1a5c1863fbabe Mon Sep 17 00:00:00 2001 From: ysuzhaixuefei Date: Mon, 9 Jul 2018 11:08:10 +0800 Subject: [PATCH] add reasoncode --- protos/core/discover.proto | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/protos/core/discover.proto b/protos/core/discover.proto index 0808aef..dd987e6 100644 --- a/protos/core/discover.proto +++ b/protos/core/discover.proto @@ -35,3 +35,29 @@ message Neighbours { repeated Endpoint neighbours = 2; int64 timestamp = 3; } +enum ReasonCode { + REQUESTED = 0x00; + BAD_PROTOCOL = 0x02; + TOO_MANY_PEERS = 0x04; + DUPLICATE_PEER = 0x05; + INCOMPATIBLE_PROTOCOL = 0x06; + NULL_IDENTITY = 0x07; + PEER_QUITING = 0x08; + UNEXPECTED_IDENTITY = 0x09; + LOCAL_IDENTITY = 0x0A; + PING_TIMEOUT = 0x0B; + USER_REASON = 0x10; + RESET = 0x11; + SYNC_FAIL = 0x12; + FETCH_FAIL = 0x13; + BAD_TX = 0x14; + BAD_BLOCK = 0x15; + FORKED = 0x16; + UNLINKABLE = 0x17; + INCOMPATIBLE_VERSION = 0x18; + INCOMPATIBLE_CHAIN = 0x19; + TIME_OUT = 0x20; + CONNECT_FAIL = 0x21; + TOO_MANY_PEERS_WITH_SAME_IP = 0x22; + UNKNOWN = 0xFF; +}