lnrpc/wtclientrpc: correctly merge tower client info
Prior to this commit, the wtclient would request tower info from both the legacy client and the anchors client and would then merge the results returned. This is incorrect since the two clients will have different session info and different "active" statuses for the same tower. This commit thus ensures that we dont lose this info.
This commit is contained in:
4 files changed
+421
-167
No files matched your search
@@ -107,14 +107,37 @@ message Tower {
|
||||
// The list of addresses the watchtower is reachable over.
|
||||
repeated string addresses = 2;
|
||||
|
||||
// Deprecated, use the active_session_candidate field under the
|
||||
// correct identifier in the client_type map.
|
||||
// Whether the watchtower is currently a candidate for new sessions.
|
||||
bool active_session_candidate = 3;
|
||||
bool active_session_candidate = 3 [deprecated = true];
|
||||
|
||||
// Deprecated, use the num_sessions field under the correct identifier
|
||||
// in the client_type map.
|
||||
// The number of sessions that have been negotiated with the watchtower.
|
||||
uint32 num_sessions = 4 [deprecated = true];
|
||||
|
||||
// Deprecated, use the sessions field under the correct identifier in the
|
||||
// client_type map.
|
||||
// The list of sessions that have been negotiated with the watchtower.
|
||||
repeated TowerSession sessions = 5 [deprecated = true];
|
||||
|
||||
// A list sessions held with the tower.
|
||||
repeated TowerSessionInfo session_info = 6;
|
||||
}
|
||||
|
||||
message TowerSessionInfo {
|
||||
// Whether the watchtower is currently a candidate for new sessions.
|
||||
bool active_session_candidate = 1;
|
||||
|
||||
// The number of sessions that have been negotiated with the watchtower.
|
||||
uint32 num_sessions = 4;
|
||||
uint32 num_sessions = 2;
|
||||
|
||||
// The list of sessions that have been negotiated with the watchtower.
|
||||
repeated TowerSession sessions = 5;
|
||||
repeated TowerSession sessions = 3;
|
||||
|
||||
// The session's policy type.
|
||||
PolicyType policy_type = 4;
|
||||
}
|
||||
|
||||
message ListTowersRequest {
|
||||
|
||||
Reference in new issue
Block a user