Update test cases at 1000-byte boundaries (#1439)

Update test cases for 1,000 byte TX boundaries; in 1.10 and before the fees for these were rolled up to the next DOGE, however that results in incorrect fees because the UI currently uses 1,000 bytes as a predicted size. This updates the tests to match new behaviour in 1.14.
This commit is contained in:
Ross Nicoll 2018-01-11 21:05:58 +00:00
parent 3c060b31fe
commit ad9e54ca72

View file

@ -479,10 +479,10 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain240Setup)
::importwallet(request);
BOOST_CHECK_EQUAL(wallet.mapWallet.size(), 3);
BOOST_CHECK_EQUAL(coinbaseTxns.size(), 103);
BOOST_CHECK_EQUAL(coinbaseTxns.size(), 243);
for (size_t i = 0; i < coinbaseTxns.size(); ++i) {
bool found = wallet.GetWalletTx(coinbaseTxns[i].GetHash());
bool expected = i >= 100;
bool expected = i >= 240;
BOOST_CHECK_EQUAL(found, expected);
}
}
@ -503,7 +503,7 @@ BOOST_AUTO_TEST_CASE(GetMinimumFee_test)
int64_t nMinTxFee = COIN;
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 250, 0, pool), nMinTxFee);
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 1000, 0, pool), 2 * nMinTxFee);
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 1000, 0, pool), nMinTxFee);
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 1999, 0, pool), 2 * nMinTxFee);
}
@ -522,7 +522,7 @@ BOOST_AUTO_TEST_CASE(GetMinimumFee_dust_test)
// Confirm dust penalty fees are added on
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 963, 0, pool), 2 * nMinTxFee);
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 1000, 0, pool), 3 * nMinTxFee);
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 1000, 0, pool), 2 * nMinTxFee);
BOOST_CHECK_EQUAL(CWallet::GetMinimumFee(tx, 1999, 0, pool), 3 * nMinTxFee);
}