mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
wallet: Get all balances in one call
This commit is contained in:
@@ -58,7 +58,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
|
||||
BOOST_CHECK(result.last_failed_block.IsNull());
|
||||
BOOST_CHECK(result.last_scanned_block.IsNull());
|
||||
BOOST_CHECK(!result.last_scanned_height);
|
||||
BOOST_CHECK_EQUAL(wallet.GetImmatureBalance(), 0);
|
||||
BOOST_CHECK_EQUAL(wallet.GetBalance().m_mine_immature, 0);
|
||||
}
|
||||
|
||||
// Verify ScanForWalletTransactions picks up transactions in both the old
|
||||
@@ -73,7 +73,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
|
||||
BOOST_CHECK(result.last_failed_block.IsNull());
|
||||
BOOST_CHECK_EQUAL(result.last_scanned_block, newTip->GetBlockHash());
|
||||
BOOST_CHECK_EQUAL(*result.last_scanned_height, newTip->nHeight);
|
||||
BOOST_CHECK_EQUAL(wallet.GetImmatureBalance(), 100 * COIN);
|
||||
BOOST_CHECK_EQUAL(wallet.GetBalance().m_mine_immature, 100 * COIN);
|
||||
}
|
||||
|
||||
// Prune the older block file.
|
||||
@@ -92,7 +92,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
|
||||
BOOST_CHECK_EQUAL(result.last_failed_block, oldTip->GetBlockHash());
|
||||
BOOST_CHECK_EQUAL(result.last_scanned_block, newTip->GetBlockHash());
|
||||
BOOST_CHECK_EQUAL(*result.last_scanned_height, newTip->nHeight);
|
||||
BOOST_CHECK_EQUAL(wallet.GetImmatureBalance(), 50 * COIN);
|
||||
BOOST_CHECK_EQUAL(wallet.GetBalance().m_mine_immature, 50 * COIN);
|
||||
}
|
||||
|
||||
// Prune the remaining block file.
|
||||
@@ -110,7 +110,7 @@ BOOST_FIXTURE_TEST_CASE(scan_for_wallet_transactions, TestChain100Setup)
|
||||
BOOST_CHECK_EQUAL(result.last_failed_block, newTip->GetBlockHash());
|
||||
BOOST_CHECK(result.last_scanned_block.IsNull());
|
||||
BOOST_CHECK(!result.last_scanned_height);
|
||||
BOOST_CHECK_EQUAL(wallet.GetImmatureBalance(), 0);
|
||||
BOOST_CHECK_EQUAL(wallet.GetBalance().m_mine_immature, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user