|
|
@ -40,17 +40,19 @@ const ( |
|
|
|
DiscConnDup = 0x05 |
|
|
|
DiscConnDup = 0x05 |
|
|
|
DiscGenesisErr = 0x06 |
|
|
|
DiscGenesisErr = 0x06 |
|
|
|
DiscProtoErr = 0x07 |
|
|
|
DiscProtoErr = 0x07 |
|
|
|
|
|
|
|
DiscQuitting = 0x08 |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
var discReasonToString = []string{ |
|
|
|
var discReasonToString = []string{ |
|
|
|
"Disconnect requested", |
|
|
|
"requested", |
|
|
|
"Disconnect TCP sys error", |
|
|
|
"TCP sys error", |
|
|
|
"Disconnect bad protocol", |
|
|
|
"bad protocol", |
|
|
|
"Disconnect useless peer", |
|
|
|
"useless peer", |
|
|
|
"Disconnect too many peers", |
|
|
|
"too many peers", |
|
|
|
"Disconnect already connected", |
|
|
|
"already connected", |
|
|
|
"Disconnect wrong genesis block", |
|
|
|
"wrong genesis block", |
|
|
|
"Disconnect incompatible network", |
|
|
|
"incompatible network", |
|
|
|
|
|
|
|
"quitting", |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (d DiscReason) String() string { |
|
|
|
func (d DiscReason) String() string { |
|
|
|