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.
|
zero, we have not observed any flaps for this peer.
|
||||||
*/
|
*/
|
||||||
int64 last_flap_ns = 14;
|
int64 last_flap_ns = 14;
|
||||||
|
|
||||||
|
/*
|
||||||
|
The last ping payload the peer has sent to us.
|
||||||
|
*/
|
||||||
|
bytes last_ping_payload = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
message TimestampedError {
|
message TimestampedError {
|
||||||
|
|||||||
@@ -5179,6 +5179,11 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"format": "int64",
|
"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."
|
"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{
|
rpcPeer := &lnrpc.Peer{
|
||||||
PubKey: hex.EncodeToString(nodePub[:]),
|
PubKey: hex.EncodeToString(nodePub[:]),
|
||||||
Address: serverPeer.Conn().RemoteAddr().String(),
|
Address: serverPeer.Conn().RemoteAddr().String(),
|
||||||
Inbound: serverPeer.Inbound(),
|
Inbound: serverPeer.Inbound(),
|
||||||
BytesRecv: serverPeer.BytesReceived(),
|
BytesRecv: serverPeer.BytesReceived(),
|
||||||
BytesSent: serverPeer.BytesSent(),
|
BytesSent: serverPeer.BytesSent(),
|
||||||
SatSent: satSent,
|
SatSent: satSent,
|
||||||
SatRecv: satRecv,
|
SatRecv: satRecv,
|
||||||
PingTime: serverPeer.PingTime(),
|
PingTime: serverPeer.PingTime(),
|
||||||
SyncType: lnrpcSyncType,
|
SyncType: lnrpcSyncType,
|
||||||
Features: features,
|
Features: features,
|
||||||
|
LastPingPayload: serverPeer.LastRemotePingPayload(),
|
||||||
}
|
}
|
||||||
|
|
||||||
var peerErrors []interface{}
|
var peerErrors []interface{}
|
||||||
|
|||||||
Reference in new issue
Block a user