@@ -111,13 +111,17 @@ type WalletKitClient interface {
111111
112112 // ListSweeps returns a list of sweep transaction ids known to our node.
113113 // Note that this function only looks up transaction ids, and does not
114- // query our wallet for the full set of transactions.
115- ListSweeps (ctx context.Context ) ([]string , error )
114+ // query our wallet for the full set of transactions. If startHeight is
115+ // set to zero it'll fetch all sweeps. If it's set to -1 it'll fetch the
116+ // pending sweeps only.
117+ ListSweeps (ctx context.Context , startHeight int32 ) ([]string , error )
116118
117119 // ListSweepsVerbose returns a list of sweep transactions known to our
118- // node with verbose information about each sweep.
119- ListSweepsVerbose (ctx context.Context ) ([]lnwallet.TransactionDetail ,
120- error )
120+ // node with verbose information about each sweep. If startHeight is set
121+ // to zero it'll fetch all sweeps. If it's set to -1 it'll fetch the
122+ // pending sweeps only.
123+ ListSweepsVerbose (ctx context.Context , startHeight int32 ) (
124+ []lnwallet.TransactionDetail , error )
121125
122126 // BumpFee attempts to bump the fee of a transaction by spending one of
123127 // its outputs at the given fee rate. This essentially results in a
@@ -528,14 +532,17 @@ func (m *walletKitClient) EstimateFeeRate(ctx context.Context, confTarget int32)
528532// ListSweeps returns a list of sweep transaction ids known to our node.
529533// Note that this function only looks up transaction ids (Verbose=false), and
530534// does not query our wallet for the full set of transactions.
531- func (m * walletKitClient ) ListSweeps (ctx context.Context ) ([]string , error ) {
535+ func (m * walletKitClient ) ListSweeps (ctx context.Context , startHeight int32 ) (
536+ []string , error ) {
537+
532538 rpcCtx , cancel := context .WithTimeout (ctx , m .timeout )
533539 defer cancel ()
534540
535541 resp , err := m .client .ListSweeps (
536542 m .walletKitMac .WithMacaroonAuth (rpcCtx ),
537543 & walletrpc.ListSweepsRequest {
538- Verbose : false ,
544+ Verbose : false ,
545+ StartHeight : startHeight ,
539546 },
540547 )
541548 if err != nil {
@@ -660,16 +667,17 @@ func UnmarshalTransactionDetail(tx *lnrpc.Transaction,
660667
661668// ListSweepsVerbose returns a list of sweep transactions known to our node
662669// with verbose information about each sweep.
663- func (m * walletKitClient ) ListSweepsVerbose (ctx context.Context ) (
664- []lnwallet.TransactionDetail , error ) {
670+ func (m * walletKitClient ) ListSweepsVerbose (ctx context.Context ,
671+ startHeight int32 ) ( []lnwallet.TransactionDetail , error ) {
665672
666673 rpcCtx , cancel := context .WithTimeout (ctx , m .timeout )
667674 defer cancel ()
668675
669676 resp , err := m .client .ListSweeps (
670677 m .walletKitMac .WithMacaroonAuth (rpcCtx ),
671678 & walletrpc.ListSweepsRequest {
672- Verbose : true ,
679+ Verbose : true ,
680+ StartHeight : startHeight ,
673681 },
674682 )
675683 if err != nil {
0 commit comments