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.
This commit is contained in:
Oliver Gugger
2021-10-29 14:18:08 +02:00
parent 066a83315e
commit eb2be7c7c0

View File

@@ -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)
}