lnrpc+rpc: expose last ping message received by peer over ListPeers resp
This commit is contained in:
4 files changed
+1886
-1862
No files matched your search
+1865
-1852
File diff suppressed because it is too large.
Load diff
@@ -1561,6 +1561,11 @@ message Peer {
|
||||
zero, we have not observed any flaps for this peer.
|
||||
*/
|
||||
int64 last_flap_ns = 14;
|
||||
|
||||
/*
|
||||
The last ping payload the peer has sent to us.
|
||||
*/
|
||||
bytes last_ping_payload = 15;
|
||||
}
|
||||
|
||||
message TimestampedError {
|
||||
|
||||
@@ -5179,6 +5179,11 @@
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"description": "The timestamp of the last flap we observed for this peer. If this value is\nzero, we have not observed any flaps for this peer."
|
||||
},
|
||||
"last_ping_payload": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"description": "The last ping payload the peer has sent to us."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+11
-10
@@ -2682,16 +2682,17 @@ func (r *rpcServer) ListPeers(ctx context.Context,
|
||||
)
|
||||
|
||||
rpcPeer := &lnrpc.Peer{
|
||||
PubKey: hex.EncodeToString(nodePub[:]),
|
||||
Address: serverPeer.Conn().RemoteAddr().String(),
|
||||
Inbound: serverPeer.Inbound(),
|
||||
BytesRecv: serverPeer.BytesReceived(),
|
||||
BytesSent: serverPeer.BytesSent(),
|
||||
SatSent: satSent,
|
||||
SatRecv: satRecv,
|
||||
PingTime: serverPeer.PingTime(),
|
||||
SyncType: lnrpcSyncType,
|
||||
Features: features,
|
||||
PubKey: hex.EncodeToString(nodePub[:]),
|
||||
Address: serverPeer.Conn().RemoteAddr().String(),
|
||||
Inbound: serverPeer.Inbound(),
|
||||
BytesRecv: serverPeer.BytesReceived(),
|
||||
BytesSent: serverPeer.BytesSent(),
|
||||
SatSent: satSent,
|
||||
SatRecv: satRecv,
|
||||
PingTime: serverPeer.PingTime(),
|
||||
SyncType: lnrpcSyncType,
|
||||
Features: features,
|
||||
LastPingPayload: serverPeer.LastRemotePingPayload(),
|
||||
}
|
||||
|
||||
var peerErrors []interface{}
|
||||
|
||||
Reference in new issue
Block a user