tests: Modify to handle changes to WalletBalance response
This commit is contained in:
parent
a234e01c07
commit
eb13be9adf
@ -1107,7 +1107,7 @@ func testChannelForceClosure(net *networkHarness, t *harnessTest) {
|
||||
t.Fatalf("unable to get carol's balance: %v", err)
|
||||
}
|
||||
|
||||
carolStartingBalance := btcutil.Amount(carolBalResp.Balance * 1e8)
|
||||
carolStartingBalance := btcutil.Amount(carolBalResp.ConfirmedBalance * 1e8)
|
||||
|
||||
ctxt, _ := context.WithTimeout(ctxb, timeout)
|
||||
chanPoint := openChannelAndAssert(ctxt, t, net, net.Alice, carol,
|
||||
@ -1707,10 +1707,10 @@ func testChannelForceClosure(net *networkHarness, t *harnessTest) {
|
||||
t.Fatalf("unable to get carol's balance: %v", err)
|
||||
}
|
||||
carolExpectedBalance := carolStartingBalance + pushAmt
|
||||
if btcutil.Amount(carolBalResp.Balance*1e8) < carolExpectedBalance {
|
||||
if btcutil.Amount(carolBalResp.ConfirmedBalance*1e8) < carolExpectedBalance {
|
||||
t.Fatalf("carol's balance is incorrect: expected %v got %v",
|
||||
carolExpectedBalance,
|
||||
btcutil.Amount(carolBalResp.Balance*1e8))
|
||||
btcutil.Amount(carolBalResp.ConfirmedBalance*1e8))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -868,8 +868,8 @@ out:
|
||||
return err
|
||||
}
|
||||
|
||||
if aliceResp.Balance == expectedBalance &&
|
||||
bobResp.Balance == expectedBalance {
|
||||
if aliceResp.ConfirmedBalance == expectedBalance &&
|
||||
bobResp.ConfirmedBalance == expectedBalance {
|
||||
break out
|
||||
}
|
||||
case <-balanceTimeout:
|
||||
@ -1494,7 +1494,7 @@ func (n *networkHarness) SendCoins(ctx context.Context, amt btcutil.Amount,
|
||||
return err
|
||||
}
|
||||
|
||||
if currentBal.Balance == initialBalance.Balance+int64(amt) {
|
||||
if currentBal.ConfirmedBalance == initialBalance.ConfirmedBalance+int64(amt) {
|
||||
return nil
|
||||
}
|
||||
case <-balanceTimeout:
|
||||
|
Loading…
Reference in New Issue
Block a user