mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
p2p: fix a merge issue, address Felix's review
This commit is contained in:
parent
e0d0a25cd7
commit
b2685aad2a
2 changed files with 1 additions and 3 deletions
|
|
@ -73,7 +73,6 @@ const (
|
||||||
DiscSelf
|
DiscSelf
|
||||||
DiscReadTimeout
|
DiscReadTimeout
|
||||||
DiscSubprotocolError
|
DiscSubprotocolError
|
||||||
DiscThrottled
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var discReasonToString = [...]string{
|
var discReasonToString = [...]string{
|
||||||
|
|
@ -90,7 +89,6 @@ var discReasonToString = [...]string{
|
||||||
DiscSelf: "Connected to self",
|
DiscSelf: "Connected to self",
|
||||||
DiscReadTimeout: "Read timeout",
|
DiscReadTimeout: "Read timeout",
|
||||||
DiscSubprotocolError: "Subprotocol error",
|
DiscSubprotocolError: "Subprotocol error",
|
||||||
DiscThrottled: "Node throttled",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d DiscReason) String() string {
|
func (d DiscReason) String() string {
|
||||||
|
|
|
||||||
|
|
@ -616,7 +616,7 @@ func (srv *Server) checkPeer(id discover.NodeID) (bool, DiscReason) {
|
||||||
case id == srv.ntab.Self().ID:
|
case id == srv.ntab.Self().ID:
|
||||||
return false, DiscSelf
|
return false, DiscSelf
|
||||||
case srv.throttle[id]:
|
case srv.throttle[id]:
|
||||||
return false, DiscThrottled
|
return false, DiscUselessPeer
|
||||||
default:
|
default:
|
||||||
return true, 0
|
return true, 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue