multi: move payment related code into own package

This commit moves most of the code into its own package. It is
the smallest code move possible without moving import cycles and
keeping the changes to the code base as small as possible during
refactor.
This commit is contained in:
ziggie committed 2025-08-14 19:53:15 +02:00
1 parent 77a6b577eb
commit 03af9858d2
26 files changed
+1075 -948

No files matched your search

+9 -8
View File
@@ -10,6 +10,7 @@ import (
graphdb "github.com/lightningnetwork/lnd/graph/db"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lnwire"
paymentsdb "github.com/lightningnetwork/lnd/payments/db"
"github.com/lightningnetwork/lnd/queue"
"github.com/lightningnetwork/lnd/routing"
"github.com/lightningnetwork/lnd/routing/route"
@@ -129,13 +130,13 @@ func TestTrackPaymentsInflightUpdates(t *testing.T) {
}()
// Enqueue some payment updates on the mock.
towerMock.queue.ChanIn() <- &channeldb.MPPayment{
towerMock.queue.ChanIn() <- &paymentsdb.MPPayment{
Info: &channeldb.PaymentCreationInfo{},
Status: channeldb.StatusInFlight,
Status: paymentsdb.StatusInFlight,
}
towerMock.queue.ChanIn() <- &channeldb.MPPayment{
towerMock.queue.ChanIn() <- &paymentsdb.MPPayment{
Info: &channeldb.PaymentCreationInfo{},
Status: channeldb.StatusSucceeded,
Status: paymentsdb.StatusSucceeded,
}
// Wait until there's 2 updates or the deadline is exceeded.
@@ -191,13 +192,13 @@ func TestTrackPaymentsNoInflightUpdates(t *testing.T) {
}()
// Enqueue some payment updates on the mock.
towerMock.queue.ChanIn() <- &channeldb.MPPayment{
towerMock.queue.ChanIn() <- &paymentsdb.MPPayment{
Info: &channeldb.PaymentCreationInfo{},
Status: channeldb.StatusInFlight,
Status: paymentsdb.StatusInFlight,
}
towerMock.queue.ChanIn() <- &channeldb.MPPayment{
towerMock.queue.ChanIn() <- &paymentsdb.MPPayment{
Info: &channeldb.PaymentCreationInfo{},
Status: channeldb.StatusSucceeded,
Status: paymentsdb.StatusSucceeded,
}
// Wait until there's 1 update or the deadline is exceeded.