@@ -92,7 +92,7 @@ type executeConfig struct {
92
92
sweeper * sweep.Sweeper
93
93
statusChan chan <- SwapInfo
94
94
blockEpochChan <- chan interface {}
95
- timerFactory func (d time.Duration ) <- chan time.Time
95
+ timerFactory func (time.Duration ) <- chan time.Time
96
96
loopOutMaxParts uint32
97
97
totalPaymentTimout time.Duration
98
98
maxPaymentRetries int
@@ -144,7 +144,7 @@ func newLoopOutSwap(globalCtx context.Context, cfg *swapConfig,
144
144
}
145
145
146
146
err = validateLoopOutContract (
147
- cfg .lnd , currentHeight , request , swapHash , swapResp ,
147
+ cfg .lnd , request , swapHash , swapResp ,
148
148
)
149
149
if err != nil {
150
150
return nil , err
@@ -246,8 +246,8 @@ func newLoopOutSwap(globalCtx context.Context, cfg *swapConfig,
246
246
247
247
// resumeLoopOutSwap returns a swap object representing a pending swap that has
248
248
// been restored from the database.
249
- func resumeLoopOutSwap (reqContext context. Context , cfg * swapConfig ,
250
- pend * loopdb. LoopOut ) (* loopOutSwap , error ) {
249
+ func resumeLoopOutSwap (cfg * swapConfig , pend * loopdb. LoopOut ,
250
+ ) (* loopOutSwap , error ) {
251
251
252
252
hash := lntypes .Hash (sha256 .Sum256 (pend .Contract .Preimage [:]))
253
253
@@ -386,7 +386,6 @@ func (s *loopOutSwap) execute(mainCtx context.Context,
386
386
// executeAndFinalize executes a swap and awaits the definitive outcome of the
387
387
// offchain payments. When this method returns, the swap outcome is final.
388
388
func (s * loopOutSwap ) executeAndFinalize (globalCtx context.Context ) error {
389
-
390
389
// Announce swap by sending out an initial update.
391
390
err := s .sendUpdate (globalCtx )
392
391
if err != nil {
@@ -996,7 +995,6 @@ func (s *loopOutSwap) waitForConfirmedHtlc(globalCtx context.Context) (
996
995
}
997
996
998
997
s .log .Infof ("Swap script confirmed on chain" )
999
-
1000
998
} else {
1001
999
s .log .Infof ("Retrieving htlc onchain" )
1002
1000
select {
@@ -1650,9 +1648,8 @@ func (s *loopOutSwap) sweep(ctx context.Context, htlcOutpoint wire.OutPoint,
1650
1648
1651
1649
// validateLoopOutContract validates the contract parameters against our
1652
1650
// request.
1653
- func validateLoopOutContract (lnd * lndclient.LndServices ,
1654
- height int32 , request * OutRequest , swapHash lntypes.Hash ,
1655
- response * newLoopOutResponse ) error {
1651
+ func validateLoopOutContract (lnd * lndclient.LndServices , request * OutRequest ,
1652
+ swapHash lntypes.Hash , response * newLoopOutResponse ) error {
1656
1653
1657
1654
// Check invoice amounts.
1658
1655
chainParams := lnd .ChainParams
0 commit comments