mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
refactor: create FetchLightningNode with no tx param
In preparation for adding a clean Graph DB interface, we create a version of FetchLightningNode that doesnt allow a caller to provide in a transaction.
This commit is contained in:
@@ -105,7 +105,9 @@ func (d *dbNode) ForEachChannel(cb func(ChannelEdge) error) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
node, err := d.db.FetchLightningNode(tx, ep.ToNode)
|
||||
node, err := d.db.FetchLightningNodeTx(
|
||||
tx, ep.ToNode,
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -164,7 +166,7 @@ func (d *databaseChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
dbNode, err := d.db.FetchLightningNode(nil, vertex)
|
||||
dbNode, err := d.db.FetchLightningNode(vertex)
|
||||
switch {
|
||||
case err == channeldb.ErrGraphNodeNotFound:
|
||||
fallthrough
|
||||
|
Reference in New Issue
Block a user