lntest: add DeleteForwardingHistory to RPC harness
What changed, and why it matters
This commit only adds a test-helper wrapper for an existing RPC method. It does not change production code, user-facing behavior, or security controls. There is no security issue in the diff itself.
No security action required. Review the underlying DeleteForwardingHistory RPC implementation separately if security relevance is suspected, but this test-harness commit does not introduce or fix a vulnerability.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds DeleteForwardingHistory to the lntest RPC harness in lntest/rpc/router.go. It follows the same pattern as other router RPC wrappers: create a context with timeout, call h.Router.DeleteForwardingHistory, and assert no error. The underlying RPC already exists; this commit merely exposes it in test infrastructure.
Changed components
lntest/rpc/router.goInspect captured patch +16 / −0
diff --git a/lntest/rpc/router.go b/lntest/rpc/router.go
index ccc7b0e..d368e66 100644
--- a/lntest/rpc/router.go
+++ b/lntest/rpc/router.go
@@ -283,3 +283,19 @@ func (h *HarnessRPC) TrackPaymentV2(payHash []byte) TrackPaymentClient {
return client
}
+
+// DeleteForwardingHistory makes a RPC call to the node's RouterClient and
+// asserts.
+//
+//nolint:ll
+func (h *HarnessRPC) DeleteForwardingHistory(
+ req *routerrpc.DeleteForwardingHistoryRequest) *routerrpc.DeleteForwardingHistoryResponse {
+
+ ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
+ defer cancel()
+
+ resp, err := h.Router.DeleteForwardingHistory(ctxt, req)
+ h.NoError(err, "DeleteForwardingHistory")
+
+ return resp
+}
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.