Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 764 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(BlockAssembler_construction) { | ||||
{ | { | ||||
gArgs.ClearArg("-blockmaxsize"); | gArgs.ClearArg("-blockmaxsize"); | ||||
BlockAssembler ba(config, g_mempool); | BlockAssembler ba(config, g_mempool); | ||||
BOOST_CHECK_EQUAL(ba.GetMaxGeneratedBlockSize(), | BOOST_CHECK_EQUAL(ba.GetMaxGeneratedBlockSize(), | ||||
DEFAULT_MAX_GENERATED_BLOCK_SIZE); | DEFAULT_MAX_GENERATED_BLOCK_SIZE); | ||||
} | } | ||||
} | } | ||||
BOOST_AUTO_TEST_CASE(TestCBlockTemplateEntry) { | |||||
const CTransaction tx; | |||||
CTransactionRef txRef = MakeTransactionRef(tx); | |||||
CBlockTemplateEntry txEntry(txRef, 1 * SATOSHI, 200, 10); | |||||
BOOST_CHECK_MESSAGE(txEntry.tx == txRef, "Transactions did not match"); | |||||
BOOST_CHECK_EQUAL(txEntry.txFee, 1 * SATOSHI); | |||||
BOOST_CHECK_EQUAL(txEntry.txSize, 200); | |||||
BOOST_CHECK_EQUAL(txEntry.txSigOps, 10); | |||||
} | |||||
BOOST_AUTO_TEST_SUITE_END() | BOOST_AUTO_TEST_SUITE_END() |