loopd call swapserver with SwapPublicationDeadline set

pull/129/head
Johan T. Halseth 4 years ago
parent 18608a6aa3
commit b2d1d99521
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -99,6 +99,10 @@ type LoopOutQuoteRequest struct {
// client sweep tx.
SweepConfTarget int32
// SwapPublicationDeadline can be set by the client to allow the server
// delaying publication of the swap HTLC to save on chain fees.
SwapPublicationDeadline time.Time
// TODO: Add argument to specify confirmation target for server
// publishing htlc. This may influence the swap fee quote, because the
// server needs to pay more for faster confirmations.

@ -266,6 +266,9 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context,
quote, err := s.impl.LoopOutQuote(ctx, &loop.LoopOutQuoteRequest{
Amount: btcutil.Amount(req.Amt),
SweepConfTarget: confTarget,
SwapPublicationDeadline: time.Unix(
int64(req.SwapPublicationDeadline), 0,
),
})
if err != nil {
return nil, err

Loading…
Cancel
Save