mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +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.
|
Denotes that we are not receiving new graph updates from the peer.
|
||||||
*/
|
*/
|
||||||
PASSIVE_SYNC = 2;
|
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.
|
// The type of sync we are currently performing with this peer.
|
||||||
|
|
|
@ -2269,10 +2269,11 @@
|
||||||
"enum": [
|
"enum": [
|
||||||
"UNKNOWN_SYNC",
|
"UNKNOWN_SYNC",
|
||||||
"ACTIVE_SYNC",
|
"ACTIVE_SYNC",
|
||||||
"PASSIVE_SYNC"
|
"PASSIVE_SYNC",
|
||||||
|
"PINNED_SYNC"
|
||||||
],
|
],
|
||||||
"default": "UNKNOWN_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": {
|
"PendingChannelsResponseClosedChannel": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -2744,6 +2744,8 @@ func (r *rpcServer) ListPeers(ctx context.Context,
|
||||||
lnrpcSyncType = lnrpc.Peer_ACTIVE_SYNC
|
lnrpcSyncType = lnrpc.Peer_ACTIVE_SYNC
|
||||||
case discovery.PassiveSync:
|
case discovery.PassiveSync:
|
||||||
lnrpcSyncType = lnrpc.Peer_PASSIVE_SYNC
|
lnrpcSyncType = lnrpc.Peer_PASSIVE_SYNC
|
||||||
|
case discovery.PinnedSync:
|
||||||
|
lnrpcSyncType = lnrpc.Peer_PINNED_SYNC
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unhandled sync type %v",
|
return nil, fmt.Errorf("unhandled sync type %v",
|
||||||
syncType)
|
syncType)
|
||||||
|
|
Loading…
Add table
Reference in a new issue