From eb2be7c7c0a6fba536a615202807219d51f95fa5 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 29 Oct 2021 14:18:08 +0200 Subject: [PATCH] lntest: count unconfirmed balance as well It looks like in some cases (apparently mostly on Windows) a previous sub test sometimes leaves some unconfirmed balance in the wallet. That balance is confirmed in the next test when new coins are sent to the wallet. --- lntest/harness.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lntest/harness.go b/lntest/harness.go index 3cba2a013..5d96efac8 100644 --- a/lntest/harness.go +++ b/lntest/harness.go @@ -1615,7 +1615,9 @@ func (n *NetworkHarness) sendCoins(amt btcutil.Amount, target *HarnessNode, return err } - expectedBalance := btcutil.Amount(initialBalance.ConfirmedBalance) + amt + fullInitialBalance := initialBalance.ConfirmedBalance + + initialBalance.UnconfirmedBalance + expectedBalance := btcutil.Amount(fullInitialBalance) + amt return target.WaitForBalance(expectedBalance, true) }