Skip to content

Commit 5914026

Browse files
committed
loopd: implement SweepHtlc RPC
1 parent 0b53296 commit 5914026

3 files changed

Lines changed: 994 additions & 0 deletions

File tree

loopd/swapclient_server.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,17 @@ func (s *swapClientServer) StopDaemon(ctx context.Context,
13651365
return &looprpc.StopDaemonResponse{}, nil
13661366
}
13671367

1368+
// SweepHtlc spends a Loop HTLC output using the success path and a known
1369+
// preimage.
1370+
func (s *swapClientServer) SweepHtlc(ctx context.Context,
1371+
req *looprpc.SweepHtlcRequest) (*looprpc.SweepHtlcResponse, error) {
1372+
1373+
return sweepHtlc(
1374+
ctx, req, s.lnd.ChainParams, s.impl.Store,
1375+
s.lnd.ChainNotifier, s.lnd.WalletKit, s.lnd.Signer,
1376+
)
1377+
}
1378+
13681379
// GetLiquidityParams gets our current liquidity manager's parameters.
13691380
func (s *swapClientServer) GetLiquidityParams(_ context.Context,
13701381
_ *looprpc.GetLiquidityParamsRequest) (*looprpc.LiquidityParameters,

0 commit comments

Comments
 (0)