Commit Graph

9 Commits (c06b6190af88cde9418dde1e47a816da0f6bdb1c)

Author SHA1 Message Date
Boris Nagaev 1947b90842
multi: typed callback in ExecTx
Provide a wrapped store type, exposing ExecTx method with a subset
interface in the callback argument. BaseDB interfaces in instantout,
reservation and sweepbatcher use ExecTx with their subset Querier
instead of whole sqlc.Querier (*sqlc.Queries).

This is needed to make the packages more reusable, so they don't
depend on methods of *sqlc.Queries they don't use.
4 months ago
Boris Nagaev 2847e83fcf
multi: separate Querier from BaseDB interfaces
A Querier holds the methods of sqlc.Querier interface relevant for a package.
BaseDB has Querier + ExecTx method.

This change is needed to simplify further rework of ExecTx.
4 months ago
Boris Nagaev b311649ce4
sweepbatcher: use write tx in DropBatch 4 months ago
Boris Nagaev 7a7ea05e52
sweepbatcher/Store: do not provide LoopOut field
This data is not used by Batcher since commit
"sweepbatcher: load swap from loopdb, not own store".

Now sweepbatcher.Store depends only on tables sweeps and sweep_batches
and does not depend on swaps, loopout_swaps and htlc_keys, making it
easier to reuse.
4 months ago
Boris Nagaev 4258b95dd2
sweepbatcher: fix too long lines 4 months ago
Boris Nagaev 6def712dfe
sweepbatcher: fix typos in annotations of methods 4 months ago
Andras Banki-Horvath 939c9b4ccf
loopdb+sweepbatcher: add the DropBatch call 5 months ago
Andras Banki-Horvath b4ebb19a77
loopdb+sweepbatcher: add GetParentBatch and TotalSwept calls 7 months ago
George Tsagkarelis 99608ad515
loopdb+sweepbatcher: add sweepbatcher store 9 months ago