Changeset View
Changeset View
Standalone View
Standalone View
src/test/excessiveblock_tests.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(excessiveblock_rpc) { | ||||
BOOST_CHECK_NO_THROW(CallRPC(std::string("setexcessiveblock ") + | BOOST_CHECK_NO_THROW(CallRPC(std::string("setexcessiveblock ") + | ||||
std::to_string(DEFAULT_MAX_BLOCK_SIZE * 8))); | std::to_string(DEFAULT_MAX_BLOCK_SIZE * 8))); | ||||
BOOST_CHECK_NO_THROW( | BOOST_CHECK_NO_THROW( | ||||
CallRPC(std::string("setexcessiveblock ") + | CallRPC(std::string("setexcessiveblock ") + | ||||
std::to_string(std::numeric_limits<int64_t>::max()))); | std::to_string(std::numeric_limits<int64_t>::max()))); | ||||
BOOST_CHECK_THROW( | BOOST_CHECK_THROW( | ||||
CallRPC(std::string("setexcessiveblock ") + | CallRPC( | ||||
std::to_string(std::numeric_limits<int64_t>::max() + 1)), | std::string("setexcessiveblock ") + | ||||
std::to_string(uint64_t(std::numeric_limits<int64_t>::max()) + 1)), | |||||
std::runtime_error); | std::runtime_error); | ||||
BOOST_CHECK_THROW( | BOOST_CHECK_THROW( | ||||
CallRPC(std::string("setexcessiveblock ") + | CallRPC(std::string("setexcessiveblock ") + | ||||
std::to_string(std::numeric_limits<uint64_t>::max())), | std::to_string(std::numeric_limits<uint64_t>::max())), | ||||
std::runtime_error); | std::runtime_error); | ||||
} | } | ||||
BOOST_AUTO_TEST_SUITE_END() | BOOST_AUTO_TEST_SUITE_END() |