mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopdb: add helper methods to update swap costs
This commit adds the necessary sqlc code and SwapStore function to update swap costs for all swaps in one transaction.
This commit is contained in:
parent
08aa4db35d
commit
4f5c806ba5
8 changed files with 245 additions and 0 deletions
|
|
@ -65,6 +65,11 @@ type SwapStore interface {
|
|||
// it's decoding using the proto package's `Unmarshal` method.
|
||||
FetchLiquidityParams(ctx context.Context) ([]byte, error)
|
||||
|
||||
// BatchUpdateLoopOutSwapCosts updates the swap costs for a batch of
|
||||
// loop out swaps.
|
||||
BatchUpdateLoopOutSwapCosts(ctx context.Context,
|
||||
swaps map[lntypes.Hash]SwapCost) error
|
||||
|
||||
// Close closes the underlying database.
|
||||
Close() error
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue