graph/db: thread context to AddLightningNode

This commit is contained in:
Elle Mouton
2025-06-17 11:34:58 +02:00
parent c1740c14ba
commit d1cfb47428
15 changed files with 126 additions and 81 deletions

View File

@@ -422,7 +422,9 @@ func (d *testDBGraph) addRandChannel(node1, node2 *btcec.PublicKey,
AuthSigBytes: testSig.Serialize(),
}
graphNode.AddPubKey(pub)
err := d.db.AddLightningNode(graphNode)
err := d.db.AddLightningNode(
context.Background(), graphNode,
)
if err != nil {
return nil, err
}
@@ -450,7 +452,9 @@ func (d *testDBGraph) addRandChannel(node1, node2 *btcec.PublicKey,
AuthSigBytes: testSig.Serialize(),
}
dbNode.AddPubKey(nodeKey)
if err := d.db.AddLightningNode(dbNode); err != nil {
if err := d.db.AddLightningNode(
context.Background(), dbNode,
); err != nil {
return nil, err
}
@@ -554,7 +558,8 @@ func (d *testDBGraph) addRandNode() (*btcec.PublicKey, error) {
AuthSigBytes: testSig.Serialize(),
}
dbNode.AddPubKey(nodeKey)
if err := d.db.AddLightningNode(dbNode); err != nil {
err = d.db.AddLightningNode(context.Background(), dbNode)
if err != nil {
return nil, err
}