channeldb+routing: add tx parameter

Adds an optional tx parameter to ForAllOutgoingChannels and FetchChannel
so that data can be queried within the context of an existing database
transaction.
This commit is contained in:
Joost Jager
2021-08-23 12:16:37 +02:00
parent 23cd231483
commit 3f775778c3
13 changed files with 62 additions and 32 deletions

View File

@@ -282,7 +282,7 @@ func initAutoPilot(svr *server, cfg *lncfg.AutoPilot,
ChannelInfo: func(chanPoint wire.OutPoint) (
*autopilot.LocalChannel, error) {
channel, err := svr.chanStateDB.FetchChannel(chanPoint)
channel, err := svr.chanStateDB.FetchChannel(nil, chanPoint)
if err != nil {
return nil, err
}