lnrpc: expose PINNED_SYNC for listpeers

This commit is contained in:
Conner Fromknecht 2021-01-29 00:14:07 -08:00
parent 340414356d
commit 2371fc5a8e
No known key found for this signature in database
GPG key ID: E7D737B67FA592C7
4 changed files with 790 additions and 777 deletions

File diff suppressed because it is too large Load diff

View file

@ -1487,6 +1487,11 @@ message Peer {
Denotes that we are not receiving new graph updates from the peer.
*/
PASSIVE_SYNC = 2;
/*
Denotes that this peer is pinned into an active sync.
*/
PINNED_SYNC = 3;
}
// The type of sync we are currently performing with this peer.

View file

@ -2269,10 +2269,11 @@
"enum": [
"UNKNOWN_SYNC",
"ACTIVE_SYNC",
"PASSIVE_SYNC"
"PASSIVE_SYNC",
"PINNED_SYNC"
],
"default": "UNKNOWN_SYNC",
"description": " - UNKNOWN_SYNC: Denotes that we cannot determine the peer's current sync type.\n - ACTIVE_SYNC: Denotes that we are actively receiving new graph updates from the peer.\n - PASSIVE_SYNC: Denotes that we are not receiving new graph updates from the peer."
"description": " - UNKNOWN_SYNC: Denotes that we cannot determine the peer's current sync type.\n - ACTIVE_SYNC: Denotes that we are actively receiving new graph updates from the peer.\n - PASSIVE_SYNC: Denotes that we are not receiving new graph updates from the peer.\n - PINNED_SYNC: Denotes that this peer is pinned into an active sync."
},
"PendingChannelsResponseClosedChannel": {
"type": "object",

View file

@ -2744,6 +2744,8 @@ func (r *rpcServer) ListPeers(ctx context.Context,
lnrpcSyncType = lnrpc.Peer_ACTIVE_SYNC
case discovery.PassiveSync:
lnrpcSyncType = lnrpc.Peer_PASSIVE_SYNC
case discovery.PinnedSync:
lnrpcSyncType = lnrpc.Peer_PINNED_SYNC
default:
return nil, fmt.Errorf("unhandled sync type %v",
syncType)