itest+lntest: fix itest re the new block driven behavior

This commit is contained in:
yyforyongyu committed 2024-04-19 21:33:26 +08:00
1 parent 558d9bd3ce
commit 521b1fc34a
10 files changed
+445 -108

No files matched your search

+17
View File
@@ -2591,3 +2591,20 @@ func (h *HarnessTest) AssertWalletLockedBalance(hn *node.HarnessNode,
require.NoError(h, err, "%s: timeout checking locked balance",
hn.Name())
}
// AssertNumPendingSweeps asserts the number of pending sweeps for the given
// node.
func (h *HarnessTest) AssertNumPendingSweeps(hn *node.HarnessNode, n int) {
err := wait.NoError(func() error {
resp := hn.RPC.PendingSweeps()
num := len(resp.PendingSweeps)
if num == n {
return nil
}
return fmt.Errorf("want %d , got %d", n, num)
}, DefaultTimeout)
require.NoErrorf(h, err, "%s: check pending sweeps timeout", hn.Name())
}