2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-16 00:12:52 +00:00
loop/sweepbatcher
Boris Nagaev 029d0870b5
sweepbatcher: unit tests with SQL loopdb as well
This is needed to cover the code of SQLStore with tests.

To achieve compatibility with loopdb (SQLite), the following changes were done:

 - DestAddr is filled to avoid crash in SQL layer
 - Preimage is filled to avoid uniqueness checks by the DB
 - the code working with batch IDs was changed to work correctly
   when batch_id starts with 1 instead of 0
 - SQL swap store has to have a swap with swap_hash from sweep
   to satisfy foreign key constraint of the DB
2024-06-21 23:33:11 -03:00
..
log.go sweepbatcher: fix too long lines 2024-05-29 12:17:18 -03:00
store_mock.go Revert "sweepbatcher/StoreMock: load LoopOut from loopdb" 2024-05-31 12:28:02 -03:00
store.go multi: typed callback in ExecTx 2024-06-19 10:38:55 -03:00
sweep_batch.go sweepbatcher: fix race condition when stopping 2024-06-18 11:34:43 -03:00
sweep_batcher_test.go sweepbatcher: unit tests with SQL loopdb as well 2024-06-21 23:33:11 -03:00
sweep_batcher.go sweepbatcher: use %w for wrapped errors 2024-06-20 14:14:24 -03:00