28 Commits

Author SHA1 Message Date
ziggie
f540e9c8ec paymentsdb: add helper method to set session key
This is only used for testing because we have now a unique
contraint on the session key and need to swap it in tests for
the sql backend.
pick f17baec94 paymentsdb: fix linter
2025-09-08 08:23:58 +02:00
ziggie
335a9b3f40 lnd: reduce max limit when querying for payments 2025-09-05 09:54:00 +02:00
ziggie
e20a34de46 paymentsdb: refactor attempt verification 2025-09-05 09:52:41 +02:00
ziggie
0320dfcc89 paymentsdb: add compile time check for the kv db implementation 2025-09-05 09:52:40 +02:00
ziggie
3d4ee8b874 paymentsdb: rename defaultKVStoreOptions func
We rename the modifier to use the same naming as used in the
graphDB to align the codebase.
2025-09-05 09:52:40 +02:00
Boris Nagaev
dee8ad3754 multi: context.Background() -> t.Context()
Use the new feature of Go 1.24, fix linter warnings.

This change was produced by:
 - running golangci-lint run --fix
 - sed 's/context.Background/t.Context/' -i `git grep -l context.Background | grep test.go`
 - manually fixing broken tests
 - itest, lntest: use ht.Context() where ht or hn is available
 - in HarnessNode.Stop() we keep using context.Background(), because it is
   called from a cleanup handler in which t.Context() is canceled already.
2025-08-30 14:13:44 -03:00
ziggie
b16782caeb multi: move DBMPPayment to paymentsdb package 2025-08-20 09:08:19 +02:00
ziggie
9ac93e75ac paymentsdb: fix linter 2025-08-20 09:08:18 +02:00
ziggie
f87841d638 paymentsdb: declare helper functions and add comments 2025-08-20 09:07:53 +02:00
ziggie
82242f5342 multi: rename KVPaymentDB to KVStore
This matches the same naming as used in the graph package.
2025-08-20 09:07:53 +02:00
ziggie
6abd539a2d paymentsdb: add missing function comments 2025-08-20 09:07:53 +02:00
ziggie
8245e356e5 paymentsdb: move serialization methods to kv_store file 2025-08-20 09:07:53 +02:00
ziggie
7423bfece9 paymentsdb: rename assertPaymentstatus 2025-08-20 09:07:53 +02:00
ziggie
a1fc8a3eee paymentsdb: rename db agnostic tests to highlight their behaviour 2025-08-20 09:07:52 +02:00
ziggie
68a8cf199d paymentsdb: rename assertPayments 2025-08-20 09:07:52 +02:00
ziggie
8726ba3d7c paymentsdb: move more tests
we make the index assertion db independant so it is a noop for
a future native sql backend. This allows us to reuse even more
tests for the different db architectures.
2025-08-20 09:07:52 +02:00
ziggie
e22b898c1e paymentsdb: move db interface dependant tests to different file
This commit starts reusing test cases which are not dependant on
the kv db backend. So they can be later used with the native db
implementation as well.
2025-08-20 09:07:52 +02:00
ziggie
39b7417797 paymentsdb: use querypayments method to make test db agnostic 2025-08-20 09:07:52 +02:00
ziggie
9f824fe1ee multi: introduce interface for payment database 2025-08-20 09:07:48 +02:00
ziggie
2b856f036e multi: fix linter 2025-08-14 19:53:18 +02:00
ziggie
e24ae0d7f3 paymentsdb: add missing comments for variables 2025-08-14 19:53:18 +02:00
ziggie
df9bac2ecf multi: move PaymentCreationInfo to payment pkg 2025-08-14 19:53:18 +02:00
ziggie
d138e23919 multi: move FailureReason to payment package 2025-08-14 19:53:18 +02:00
ziggie
d77b2f9c26 mulit: move payment query code to separate file
We also rename the struct since it is now in its own package
there is no need to prefix it.
2025-08-14 19:53:18 +02:00
ziggie
03af9858d2 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.
2025-08-14 19:53:15 +02:00
ziggie
88da582526 mulit: use kvdb.Backend for the kv payment db
Instead of the ChannelState struct we now use the kv backend
interface for the payment kv database.
2025-08-11 16:44:14 +02:00
ziggie
3aec40293d paymentsdb: add subsystem logging for payments package 2025-08-11 16:44:14 +02:00
ziggie
18afd4442d 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.
2025-08-11 16:44:14 +02:00