lnd: add string representation for peerAccessStatus

This commit is contained in:
yyforyongyu committed 2025-06-18 17:19:10 +08:00
1 parent 0c5bb49561
commit 0f9332b1d6
1 file changed
+17
+17
View File
@@ -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 {