swap: add constructor for swap config

This commit is contained in:
carla 2020-06-08 12:53:07 +02:00
parent 9571371153
commit 2ebbc78131
No known key found for this signature in database
GPG key ID: 4CA7FE54A6213C91
4 changed files with 22 additions and 41 deletions

View file

@ -145,11 +145,7 @@ func TestLateHtlcPublish(t *testing.T) {
height := int32(600)
cfg := &swapConfig{
lnd: &lnd.LndServices,
store: store,
server: server,
}
cfg := newSwapConfig(&lnd.LndServices, store, server)
swap, err := newLoopOutSwap(
context.Background(), cfg, height, testRequest,
@ -231,11 +227,10 @@ func TestCustomSweepConfTarget(t *testing.T) {
ctx.Lnd.SetFeeEstimate(testRequest.SweepConfTarget, 250)
ctx.Lnd.SetFeeEstimate(DefaultSweepConfTarget, 10000)
cfg := &swapConfig{
lnd: &lnd.LndServices,
store: newStoreMock(t),
server: newServerMock(),
}
cfg := newSwapConfig(
&lnd.LndServices, newStoreMock(t), newServerMock(),
)
swap, err := newLoopOutSwap(
context.Background(), cfg, ctx.Lnd.Height, testRequest,
)