Skip to content

Commit 168420c

Browse files
committed
loopd: fast-flag in GetLoopInQuote and StaticAddressLoopIn
1 parent 51258af commit 168420c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

loopd/swapclient_server.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,14 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
908908
return nil, err
909909
}
910910

911+
// The fast flag is only available for static loop in quote requests.
912+
if req.Fast {
913+
if !autoSelectDeposits && len(req.DepositOutpoints) == 0 {
914+
return nil, fmt.Errorf("fast flag is only " +
915+
"available for static address requests")
916+
}
917+
}
918+
911919
// If deposits should be automatically selected, we do so and count the
912920
// number of deposits to quote for.
913921
numDeposits := 0
@@ -1025,6 +1033,7 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context,
10251033
Private: req.Private,
10261034
Initiator: defaultLoopdInitiator,
10271035
NumDeposits: uint32(numDeposits),
1036+
Fast: req.Fast,
10281037
})
10291038
if err != nil {
10301039
return nil, err
@@ -2052,6 +2061,7 @@ func (s *swapClientServer) StaticAddressLoopIn(ctx context.Context,
20522061
Private: in.Private,
20532062
RouteHints: routeHints,
20542063
PaymentTimeoutSeconds: in.PaymentTimeoutSeconds,
2064+
Fast: in.Fast,
20552065
}
20562066

20572067
if in.LastHop != nil {

0 commit comments

Comments
 (0)