mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
lnrpc: expose PINNED_SYNC for listpeers
This commit is contained in:
parent
340414356d
commit
2371fc5a8e
4 changed files with 790 additions and 777 deletions
1555
lnrpc/rpc.pb.go
1555
lnrpc/rpc.pb.go
File diff suppressed because it is too large
Load diff
|
@ -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.
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue