Changeset View
Changeset View
Standalone View
Standalone View
src/test/undo_tests.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(connect_utxo_extblock) { | ||||
const CChainParams &chainparams = Params(); | const CChainParams &chainparams = Params(); | ||||
CBlock block; | CBlock block; | ||||
CMutableTransaction tx; | CMutableTransaction tx; | ||||
CCoinsView coinsDummy; | CCoinsView coinsDummy; | ||||
CCoinsViewCache view(&coinsDummy); | CCoinsViewCache view(&coinsDummy); | ||||
block.hashPrevBlock = InsecureRand256(); | block.hashPrevBlock = BlockHash(InsecureRand256()); | ||||
view.SetBestBlock(block.hashPrevBlock); | view.SetBestBlock(block.hashPrevBlock); | ||||
// Create a block with coinbase and resolution transaction. | // Create a block with coinbase and resolution transaction. | ||||
tx.vin.resize(1); | tx.vin.resize(1); | ||||
tx.vin[0].scriptSig.resize(10); | tx.vin[0].scriptSig.resize(10); | ||||
tx.vout.resize(1); | tx.vout.resize(1); | ||||
tx.vout[0].nValue = 42 * SATOSHI; | tx.vout[0].nValue = 42 * SATOSHI; | ||||
auto coinbaseTx = CTransaction(tx); | auto coinbaseTx = CTransaction(tx); | ||||
Show All 35 Lines |