Skip to content

fix memory leak cherry pick #9893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
54f6b16
macaroons: remove context.TODO() in tests
ellemouton Apr 7, 2025
76d2bec
kvdb/etcd: remove context.TODO() from test helpers
ellemouton Apr 7, 2025
4fca1f3
lnd: pass context to `newServer` and `server.Start`
ellemouton Apr 7, 2025
e2c184f
discovery: thread context through to gossiper
ellemouton Apr 7, 2025
5430157
discovery: pass context through to reliable sender
ellemouton Apr 7, 2025
a1a7d77
discovery: thread contexts to syncer
ellemouton Apr 7, 2025
1a5821a
discovery: thread contexts through sync manager
ellemouton Apr 7, 2025
1a8e758
discovery: pass context to ProcessRemoteAnnouncement
ellemouton Apr 7, 2025
6b95b79
discovery: pass context through to bootstrapper SampleNodeAddrs
ellemouton Apr 8, 2025
f2fb482
discovery: remove unnecessary context.Background() calls
ellemouton Apr 9, 2025
0ab61e0
discovery: listen on ctx in any select
ellemouton Apr 9, 2025
1b26b59
graph/db: test clean-up
ellemouton Apr 5, 2025
29ce762
graph/db: remove kvdb param from test helper
ellemouton Apr 5, 2025
861606d
graph/db: remove kvdb.Backend from test helpers
ellemouton Apr 5, 2025
ca52834
graph/db: use only exported KVStore ForEachNode method in tests
ellemouton Apr 9, 2025
cd4a590
autopilot: start threading contexts through
ellemouton Apr 9, 2025
46f09ba
autopilot: continue threading context
ellemouton Apr 9, 2025
1507a7f
autopilot: update AttachmentHeuristics with context
ellemouton Apr 9, 2025
9c3c2b9
graph/db: remove unused Wipe method
ellemouton Mar 29, 2025
c15740b
graph/db: introduce ForEachSourceNodeChannel
ellemouton Mar 26, 2025
9aab68a
graph/db: unexport various methods that expose `kvdb.RTx`
ellemouton Mar 27, 2025
de11997
graph/db: use only exported KVStore methods in tests
ellemouton Apr 5, 2025
2f99706
multi: remove kvdb.RTx from ForEachNodeChannel
ellemouton Mar 26, 2025
6202597
discovery: revert passing ctx through to Start methods
ellemouton Apr 11, 2025
fe3a862
autopilot: revert passing ctx to Start methods
ellemouton Apr 11, 2025
af47604
fn: add comment to context create fn
ziggie1984 Jun 3, 2025
45ebb9b
discovery: add comments to the ctx creation
ziggie1984 Jun 3, 2025
7477a91
docs: add release-notes 19.1
ziggie1984 Jun 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
graph/db: remove kvdb param from test helper
Remove the kvdb.Backend parameter from the `createChannelEdge` helper.
This is all in preparation for having the unit tests run against any DB
backend.
  • Loading branch information
ellemouton authored and ziggie1984 committed Jun 4, 2025
commit 29ce7627fdf2f5a4f696f78cc34bfc2c5e7ea4f8
14 changes: 7 additions & 7 deletions graph/db/graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ func assertEdgeInfoEqual(t *testing.T, e1 *models.ChannelEdgeInfo,
}
}

func createChannelEdge(db kvdb.Backend, node1, node2 *models.LightningNode) (
func createChannelEdge(node1, node2 *models.LightningNode) (
*models.ChannelEdgeInfo, *models.ChannelEdgePolicy,
*models.ChannelEdgePolicy) {

Expand Down Expand Up @@ -693,7 +693,7 @@ func TestEdgeInfoUpdates(t *testing.T) {
assertNodeInCache(t, graph, node2, testFeatures)

// Create an edge and add it to the db.
edgeInfo, edge1, edge2 := createChannelEdge(graph.db, node1, node2)
edgeInfo, edge1, edge2 := createChannelEdge(node1, node2)

// Make sure inserting the policy at this point, before the edge info
// is added, will fail.
Expand Down Expand Up @@ -3337,7 +3337,7 @@ func TestDisabledChannelIDs(t *testing.T) {
}

// Adding a new channel edge to the graph.
edgeInfo, edge1, edge2 := createChannelEdge(graph.db, node1, node2)
edgeInfo, edge1, edge2 := createChannelEdge(node1, node2)
if err := graph.AddLightningNode(node2); err != nil {
t.Fatalf("unable to add node: %v", err)
}
Expand Down Expand Up @@ -3416,7 +3416,7 @@ func TestEdgePolicyMissingMaxHtcl(t *testing.T) {
}
node2 := createTestVertex(t)

edgeInfo, edge1, edge2 := createChannelEdge(graph.db, node1, node2)
edgeInfo, edge1, edge2 := createChannelEdge(node1, node2)
if err := graph.AddLightningNode(node2); err != nil {
t.Fatalf("unable to add node: %v", err)
}
Expand Down Expand Up @@ -3580,7 +3580,7 @@ func TestGraphZombieIndex(t *testing.T) {
node1, node2 = node2, node1
}

edge, _, _ := createChannelEdge(graph.db, node1, node2)
edge, _, _ := createChannelEdge(node1, node2)
require.NoError(t, graph.AddChannelEdge(edge))

// Since the edge is known the graph and it isn't a zombie, IsZombieEdge
Expand Down Expand Up @@ -3868,7 +3868,7 @@ func TestBatchedUpdateEdgePolicy(t *testing.T) {
require.Nil(t, err)

// Create an edge and add it to the db.
edgeInfo, edge1, edge2 := createChannelEdge(graph.db, node1, node2)
edgeInfo, edge1, edge2 := createChannelEdge(node1, node2)

// Make sure inserting the policy at this point, before the edge info
// is added, will fail.
Expand Down Expand Up @@ -3979,7 +3979,7 @@ func TestGraphCacheForEachNodeChannel(t *testing.T) {
require.Nil(t, err)

// Create an edge and add it to the db.
edgeInfo, e1, e2 := createChannelEdge(graph.db, node1, node2)
edgeInfo, e1, e2 := createChannelEdge(node1, node2)

// Because of lexigraphical sorting and the usage of random node keys in
// this test, we need to determine which edge belongs to node 1 at
Expand Down