mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 17:05:50 +02:00
lnd: add string representation for peerAccessStatus
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
bd99924383
commit
d170ef3efe
17
server.go
17
server.go
@@ -193,6 +193,23 @@ const (
|
||||
peerStatusProtected
|
||||
)
|
||||
|
||||
// String returns a human-readable representation of the status code.
|
||||
func (p peerAccessStatus) String() string {
|
||||
switch p {
|
||||
case peerStatusRestricted:
|
||||
return "restricted"
|
||||
|
||||
case peerStatusTemporary:
|
||||
return "temporary"
|
||||
|
||||
case peerStatusProtected:
|
||||
return "protected"
|
||||
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
// peerSlotStatus determines whether a peer gets access to one of our free
|
||||
// slots or gets to bypass this safety mechanism.
|
||||
type peerSlotStatus struct {
|
||||
|
Reference in New Issue
Block a user