Merge pull request #7372 from bhandras/listsweeps-range

walletrpc: add `startheight` parameter to the `ListSweeps` RPC
This commit is contained in:
Oliver Gugger authored and GitHub committed 2024-02-02 02:03:16 -06:00
commit ca5f23a647
11 files changed
+488 -340

No files matched your search

+2 -2
View File
@@ -2041,10 +2041,10 @@ func (h *HarnessTest) FindCommitAndAnchor(sweepTxns []*wire.MsgTx,
//
// NOTE: Does not account for node's internal state.
func (h *HarnessTest) AssertSweepFound(hn *node.HarnessNode,
sweep string, verbose bool) {
sweep string, verbose bool, startHeight int32) {
// List all sweeps that alice's node had broadcast.
sweepResp := hn.RPC.ListSweeps(verbose)
sweepResp := hn.RPC.ListSweeps(verbose, startHeight)
var found bool
if verbose {
+7 -2
View File
@@ -159,11 +159,16 @@ func (h *HarnessRPC) VerifyMessageWithAddr(
}
// ListSweeps makes a ListSweeps RPC call to the node's WalletKit client.
func (h *HarnessRPC) ListSweeps(verbose bool) *walletrpc.ListSweepsResponse {
func (h *HarnessRPC) ListSweeps(verbose bool,
startHeight int32) *walletrpc.ListSweepsResponse {
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
defer cancel()
req := &walletrpc.ListSweepsRequest{Verbose: verbose}
req := &walletrpc.ListSweepsRequest{
Verbose: verbose,
StartHeight: startHeight,
}
resp, err := h.WalletKit.ListSweeps(ctxt, req)
h.NoError(err, "ListSweeps")