lnwallet: actually use 'amount' parameter
This commit is contained in:
1 parent
6eb77b02c2
commit
9840585757
1 file changed
+4
-1
@@ -47,12 +47,15 @@ var (
|
|||||||
zeroHash = bytes.Repeat([]byte{0}, 32)
|
zeroHash = bytes.Repeat([]byte{0}, 32)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// assertProperBalance asserts than the total value of the unspent outputs
|
||||||
|
// within the wallet are *exactly* amount. If unable to retrieve the current
|
||||||
|
// balance, or the assertion fails, the test will halt with a fatal error.
|
||||||
func assertProperBalance(t *testing.T, lw *LightningWallet, numConfirms, amount int32) {
|
func assertProperBalance(t *testing.T, lw *LightningWallet, numConfirms, amount int32) {
|
||||||
balance, err := lw.wallet.TxStore.Balance(0, 20)
|
balance, err := lw.wallet.TxStore.Balance(0, 20)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("unable to query for balance: %v", err)
|
t.Fatalf("unable to query for balance: %v", err)
|
||||||
}
|
}
|
||||||
if balance != btcutil.Amount(20*1e8) {
|
if balance != btcutil.Amount(amount*1e8) {
|
||||||
t.Fatalf("wallet credits not properly loaded, should have 20BTC, "+
|
t.Fatalf("wallet credits not properly loaded, should have 20BTC, "+
|
||||||
"instead have %v", balance)
|
"instead have %v", balance)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user