multi: let FetchLightningNode take an optional tx

In preparation for the next commit which will remove the
`*LightningNode` from the `ChannelEdgePolicy` struct,
`FetchLightningNode` is modified to take in an optional transaction so
that it can be utilised in places where a transaction exists.
This commit is contained in:
Elle Mouton committed 2023-11-08 14:50:34 +02:00
1 parent 9a62a46aa3
commit 6c76d31e89
9 files changed
+38 -24

No files matched your search

+1 -1
View File
@@ -1351,7 +1351,7 @@ func (d *DB) AddrsForNode(nodePub *btcec.PublicKey) ([]net.Addr,
if err != nil {
return nil, err
}
graphNode, err := d.graph.FetchLightningNode(pubKey)
graphNode, err := d.graph.FetchLightningNode(nil, pubKey)
if err != nil && err != ErrGraphNodeNotFound {
return nil, err
} else if err == ErrGraphNodeNotFound {