Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Lines | mempool.addUnchecked( | ||||
hash, | hash, | ||||
entry.Fee(HIGHERFEE).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); | entry.Fee(HIGHERFEE).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); | ||||
BOOST_CHECK(pblocktemplate = | BOOST_CHECK(pblocktemplate = | ||||
BlockAssembler(config).CreateNewBlock(scriptPubKey)); | BlockAssembler(config).CreateNewBlock(scriptPubKey)); | ||||
mempool.clear(); | mempool.clear(); | ||||
// Coinbase in mempool, template creation fails. | // Coinbase in mempool, template creation fails. | ||||
tx.vin.resize(1); | tx.vin.resize(1); | ||||
tx.vin[0].prevout.SetNull(); | tx.vin[0].prevout = COutPoint(); | ||||
tx.vin[0].scriptSig = CScript() << OP_0 << OP_1; | tx.vin[0].scriptSig = CScript() << OP_0 << OP_1; | ||||
tx.vout[0].nValue = Amount(0); | tx.vout[0].nValue = Amount(0); | ||||
hash = tx.GetId(); | hash = tx.GetId(); | ||||
// Give it a fee so it'll get mined. | // Give it a fee so it'll get mined. | ||||
mempool.addUnchecked( | mempool.addUnchecked( | ||||
hash, | hash, | ||||
entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(false).FromTx(tx)); | entry.Fee(LOWFEE).Time(GetTime()).SpendsCoinbase(false).FromTx(tx)); | ||||
BOOST_CHECK_THROW(BlockAssembler(config).CreateNewBlock(scriptPubKey), | BOOST_CHECK_THROW(BlockAssembler(config).CreateNewBlock(scriptPubKey), | ||||
▲ Show 20 Lines • Show All 368 Lines • Show Last 20 Lines |