mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd call swapserver with SwapPublicationDeadline set
This commit is contained in:
parent
18608a6aa3
commit
b2d1d99521
2 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue