walletkit: add startheight parameter to ListSweeps
By default ListSweeps will list all sweeps known to the wallet. Over time this may become expensive to call and callers may not be interested in the full history. This commit adds a `startheight` parameter to the `ListSweeps` RPC call. This parameter can be used to fetch sweeps only from a specified start block height or only unconfirmed ones if it is set to -1.
This commit is contained in:
5 files changed
+373
-334
No files matched your search
@@ -1080,7 +1080,8 @@ func (w *WalletKit) ListSweeps(ctx context.Context,
|
||||
// the wallet is still tracking. Sweeps are currently always swept to
|
||||
// the default wallet account.
|
||||
transactions, err := w.cfg.Wallet.ListTransactionDetails(
|
||||
0, btcwallet.UnconfirmedHeight, lnwallet.DefaultAccountName,
|
||||
in.StartHeight, btcwallet.UnconfirmedHeight,
|
||||
lnwallet.DefaultAccountName,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user