multi: query circuit map inside contractcourt

This commit adds a new config method `QueryIncomingCircuit` that can be
used to query the payment's incoming circuit for giving its outgoing
circuit key.
This commit is contained in:
yyforyongyu committed 2024-04-19 21:33:35 +08:00
1 parent 4134b1c00a
commit 07466c4f8c
10 files changed
+130 -44

No files matched your search

@@ -9,6 +9,7 @@ import (
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channeldb/models"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/kvdb"
"github.com/lightningnetwork/lnd/lntest/mock"
@@ -43,6 +44,11 @@ func newCommitSweepResolverTestContext(t *testing.T,
Notifier: notifier,
Sweeper: sweeper,
Budget: *DefaultBudgetConfig(),
QueryIncomingCircuit: func(
circuit models.CircuitKey) *models.CircuitKey {
return nil
},
},
PutResolverReport: func(_ kvdb.RwTx,
_ *channeldb.ResolverReport) error {