fix overflow in amount_tests
This commit is contained in:
parent
60f98b3300
commit
018458edbe
2 changed files with 3 additions and 3 deletions
|
@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(GetFeeTest)
|
|||
BOOST_CHECK(CFeeRate(CAmount(26), 789) == CFeeRate(32));
|
||||
BOOST_CHECK(CFeeRate(CAmount(27), 789) == CFeeRate(34));
|
||||
// Maximum size in bytes, should not crash
|
||||
CFeeRate(MAX_MONEY, std::numeric_limits<size_t>::max() >> 1).GetFeePerK();
|
||||
CFeeRate(MAX_MONEY / 1000, std::numeric_limits<size_t>::max() >> 1).GetFeePerK();
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(BinaryOperatorTest)
|
||||
|
|
|
@ -203,9 +203,9 @@ struct ClaimTrieChainFixture{
|
|||
assert(0);
|
||||
}
|
||||
|
||||
LOCK(cs_main);
|
||||
CValidationState state;
|
||||
CAmount txFeeRate = CAmount(0);
|
||||
LOCK(cs_main);
|
||||
BOOST_CHECK(AcceptToMemoryPool(mempool, state, MakeTransactionRef(tx), nullptr, nullptr, false, txFeeRate, false));
|
||||
}
|
||||
|
||||
|
@ -297,9 +297,9 @@ struct ClaimTrieChainFixture{
|
|||
{
|
||||
for (int i = 0; i < num_blocks; i++) {
|
||||
CValidationState state;
|
||||
CBlockIndex* pblockindex = chainActive.Tip();
|
||||
{
|
||||
LOCK(cs_main);
|
||||
CBlockIndex* pblockindex = chainActive.Tip();
|
||||
InvalidateBlock(state, Params(), pblockindex);
|
||||
}
|
||||
if (state.IsValid())
|
||||
|
|
Loading…
Add table
Reference in a new issue