mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd: fast-flag in GetLoopInQuote and StaticAddressLoopIn
This commit is contained in:
parent
51258af025
commit
168420c28d
1 changed files with 10 additions and 0 deletions
|
|
@ -908,6 +908,14 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// The fast flag is only available for static loop in quote requests.
|
||||
if req.Fast {
|
||||
if !autoSelectDeposits && len(req.DepositOutpoints) == 0 {
|
||||
return nil, fmt.Errorf("fast flag is only " +
|
||||
"available for static address requests")
|
||||
}
|
||||
}
|
||||
|
||||
// If deposits should be automatically selected, we do so and count the
|
||||
// number of deposits to quote for.
|
||||
numDeposits := 0
|
||||
|
|
@ -1025,6 +1033,7 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
|
|||
Private: req.Private,
|
||||
Initiator: defaultLoopdInitiator,
|
||||
NumDeposits: uint32(numDeposits),
|
||||
Fast: req.Fast,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -2052,6 +2061,7 @@ func (s *swapClientServer) StaticAddressLoopIn(ctx context.Context,
|
|||
Private: in.Private,
|
||||
RouteHints: routeHints,
|
||||
PaymentTimeoutSeconds: in.PaymentTimeoutSeconds,
|
||||
Fast: in.Fast,
|
||||
}
|
||||
|
||||
if in.LastHop != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue