lnrpc: update docs for `FlapCount` and `LastFlapNs`
What changed, and why it matters
This commit only updates the human-readable documentation comments for two existing fields in the LND API (FlapCount and LastFlapNs). It adds a note that these fields are only populated when the peer has at least one channel with us. No code logic, behavior, or security controls were changed.
No action required. This is a documentation-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is limited to generated protobuf Go code, the .proto definition, and the Swagger JSON schema. It adds identical documentation lines (‘This field is populated when the peer has at least one channel with us.’) to the descriptions of flap_count and last_flap_ns. There are no functional changes, no bug fixes, and no security-relevant modifications.
Changed components
lnrpc/lightning.pb.golnrpc/lightning.protolnrpc/lightning.swagger.jsonInspect captured patch +6 / −2
diff --git a/lnrpc/lightning.pb.go b/lnrpc/lightning.pb.go
index 3cb556c..d08cf3a 100644
--- a/lnrpc/lightning.pb.go
+++ b/lnrpc/lightning.pb.go
@@ -5816,11 +5816,13 @@ type Peer struct {
// stored for peers that we have channels open with, to prevent peers from
// spamming us with errors at no cost.
Errors []*TimestampedError `protobuf:"bytes,12,rep,name=errors,proto3" json:"errors,omitempty"`
+ // This field is populated when the peer has at least one channel with us.
// The number of times we have recorded this peer going offline or coming
// online, recorded across restarts. Note that this value is decreased over
// time if the peer has not recently flapped, so that we can forgive peers
// with historically high flap counts.
FlapCount int32 `protobuf:"varint,13,opt,name=flap_count,json=flapCount,proto3" json:"flap_count,omitempty"`
+ // This field is populated when the peer has at least one channel with us.
// The timestamp of the last flap we observed for this peer. If this value is
// zero, we have not observed any flaps for this peer.
LastFlapNs int64 `protobuf:"varint,14,opt,name=last_flap_ns,json=lastFlapNs,proto3" json:"last_flap_ns,omitempty"`
diff --git a/lnrpc/lightning.proto b/lnrpc/lightning.proto
index 31e19ff..9c9abdd 100644
--- a/lnrpc/lightning.proto
+++ b/lnrpc/lightning.proto
@@ -1919,6 +1919,7 @@ message Peer {
repeated TimestampedError errors = 12;
/*
+ This field is populated when the peer has at least one channel with us.
The number of times we have recorded this peer going offline or coming
online, recorded across restarts. Note that this value is decreased over
time if the peer has not recently flapped, so that we can forgive peers
@@ -1927,6 +1928,7 @@ message Peer {
int32 flap_count = 13;
/*
+ This field is populated when the peer has at least one channel with us.
The timestamp of the last flap we observed for this peer. If this value is
zero, we have not observed any flaps for this peer.
*/
diff --git a/lnrpc/lightning.swagger.json b/lnrpc/lightning.swagger.json
index c27c675..2fd4580 100644
--- a/lnrpc/lightning.swagger.json
+++ b/lnrpc/lightning.swagger.json
@@ -6926,12 +6926,12 @@
"flap_count": {
"type": "integer",
"format": "int32",
- "description": "The number of times we have recorded this peer going offline or coming\nonline, recorded across restarts. Note that this value is decreased over\ntime if the peer has not recently flapped, so that we can forgive peers\nwith historically high flap counts."
+ "description": "This field is populated when the peer has at least one channel with us.\nThe number of times we have recorded this peer going offline or coming\nonline, recorded across restarts. Note that this value is decreased over\ntime if the peer has not recently flapped, so that we can forgive peers\nwith historically high flap counts."
},
"last_flap_ns": {
"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."
+ "description": "This field is populated when the peer has at least one channel with us.\nThe 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",
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.