multi: introduce new paymentsDB package

We introduce a new package paymentsDB and start by moving the
payment specifc errors from the channeldb package to the
paymentsDB package. We also fix linter issues which showed up
due to changing this code part.
This commit is contained in:
ziggie committed 2025-08-11 16:44:14 +02:00
1 parent db2c50a599
commit 18afd4442d
12 files changed
+279 -261

No files matched your search

+2 -1
View File
@@ -13,6 +13,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/lntypes"
paymentsdb "github.com/lightningnetwork/lnd/payments/db"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/stretchr/testify/require"
)
@@ -53,7 +54,7 @@ func TestControlTowerSubscribeUnknown(t *testing.T) {
// Subscription should fail when the payment is not known.
_, err := pControl.SubscribePayment(lntypes.Hash{1})
require.ErrorIs(t, err, channeldb.ErrPaymentNotInitiated)
require.ErrorIs(t, err, paymentsdb.ErrPaymentNotInitiated)
}
// TestControlTowerSubscribeSuccess tests that payment updates for a