liquidity: add clock for mocking time in tests

This commit is contained in:
carla 2020-09-30 12:34:05 +02:00
parent 7e9034b2ff
commit ad8b5d0552
No known key found for this signature in database
GPG key ID: 4CA7FE54A6213C91
4 changed files with 14 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/loop"
"github.com/lightninglabs/loop/liquidity"
"github.com/lightningnetwork/lnd/clock"
)
// getClient returns an instance of the swap client.
@ -46,7 +47,8 @@ func getLiquidityManager(client *loop.Client) *liquidity.Manager {
outTerms.MinSwapAmount, outTerms.MaxSwapAmount,
), nil
},
Lnd: client.LndServices,
Lnd: client.LndServices,
Clock: clock.NewDefaultClock(),
}
return liquidity.NewManager(mngrCfg)