From 168420c28dcc8044826e257bfe135b59e4ff1a4c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 1 Oct 2025 08:52:08 +0200 Subject: [PATCH] loopd: fast-flag in GetLoopInQuote and StaticAddressLoopIn --- loopd/swapclient_server.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 863cb33c..d3dd9ae7 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -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 {