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
2025-08-13 09:19:20 +02:00
parent 77a6b577eb
commit 03af9858d2
26 changed files with 1075 additions and 948 deletions

View File

@@ -927,7 +927,7 @@ type DatabaseInstances struct {
// KVPaymentsDB is the database that stores all payment related
// information.
KVPaymentsDB *channeldb.KVPaymentsDB
KVPaymentsDB *paymentsdb.KVPaymentsDB
// MacaroonDB is the database that stores macaroon root keys.
MacaroonDB kvdb.Backend
@@ -1225,7 +1225,7 @@ func (d *DefaultDatabaseBuilder) BuildDatabase(
cfg.KeepFailedPaymentAttempts,
),
}
kvPaymentsDB, err := channeldb.NewKVPaymentsDB(
kvPaymentsDB, err := paymentsdb.NewKVPaymentsDB(
dbs.ChanStateDB,
paymentsDBOptions...,
)