test: update integration test set up to reflect recent RPC change

A prior commit modified the walletbalance RPC to return satoshi instead
of BTC. As a result, we need to update the SetUp method in the
networkHarness to ensure we expect the proper value when asserting
wallet balances.
This commit is contained in:
Olaoluwa Osuntokun 2017-07-04 15:52:58 -07:00
parent 7c5af4b851
commit 3b1db2b186
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
2 changed files with 3 additions and 4 deletions

@ -109,8 +109,7 @@ func (b *breachArbiter) Start() error {
// For each of the channels read from disk, we'll create a channel
// state machine in order to watch for any potential channel closures.
channelsToWatch := make([]*lnwallet.LightningChannel,
len(activeChannels))
channelsToWatch := make([]*lnwallet.LightningChannel, len(activeChannels))
for i, chanState := range activeChannels {
channel, err := lnwallet.NewLightningChannel(nil, b.notifier,
b.estimator, chanState)

@ -771,7 +771,7 @@ func (n *networkHarness) SetUp() error {
}
// Now block until both wallets have fully synced up.
expectedBalance := btcutil.Amount(btcutil.SatoshiPerBitcoin * 10).ToBTC()
expectedBalance := int64(btcutil.SatoshiPerBitcoin * 10)
balReq := &lnrpc.WalletBalanceRequest{}
balanceTicker := time.Tick(time.Millisecond * 50)
out:
@ -1347,7 +1347,7 @@ func (n *networkHarness) SendCoins(ctx context.Context, amt btcutil.Amount,
return err
}
if currentBal.Balance == initialBalance.Balance+amt.ToBTC() {
if currentBal.Balance == initialBalance.Balance+int64(amt) {
return nil
}
case <-time.After(time.Second * 30):