lnwallet: update testListTransactionDetails to account for tx fee

This commit is contained in:
Olaoluwa Osuntokun 2017-11-23 22:02:33 -06:00
parent c437f42227
commit 1b716e6c87
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
2 changed files with 6 additions and 2 deletions

@ -189,7 +189,7 @@ func (b *BtcWallet) ConfirmedBalance(confs int32, witness bool) (btcutil.Amount,
}
// NewAddress returns the next external or internal address for the wallet
// dicatated by the value of the `change` paramter. If change is true, then an
// dictated by the value of the `change` parameter. If change is true, then an
// internal address will be returned, otherwise an external address should be
// returned.
//

@ -852,7 +852,11 @@ func testListTransactionDetails(miner *rpctest.Harness,
t.Fatalf("num confs incorrect, got %v expected %v",
txDetail.NumConfirmations, 1)
}
if txDetail.Value != -outputAmt {
// We assert that the value is greater than the amount we
// attempted to send, as the wallet should've paid some amount
// of network fees.
if txDetail.Value >= -outputAmt {
fmt.Println(spew.Sdump(txDetail))
t.Fatalf("tx value incorrect, got %v expected %v",
int64(txDetail.Value), -int64(outputAmt))