Changeset View
Changeset View
Standalone View
Standalone View
src/test/txvalidationcache_tests.cpp
Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | // testing consensus vs non-standard rules in `checkinputs_test`. | ||||
BOOST_CHECK(coinbaseKey.SignECDSA(nulldummySigHash, nullDummyVchSig)); | BOOST_CHECK(coinbaseKey.SignECDSA(nulldummySigHash, nullDummyVchSig)); | ||||
nullDummyVchSig.push_back(uint8_t(SIGHASH_ALL | SIGHASH_FORKID)); | nullDummyVchSig.push_back(uint8_t(SIGHASH_ALL | SIGHASH_FORKID)); | ||||
mutableFunding_tx.vin[0].scriptSig << nullDummyVchSig; | mutableFunding_tx.vin[0].scriptSig << nullDummyVchSig; | ||||
} | } | ||||
const CTransaction funding_tx = CTransaction(mutableFunding_tx); | const CTransaction funding_tx = CTransaction(mutableFunding_tx); | ||||
// Spend the funding transaction by mining it into a block | // Spend the funding transaction by mining it into a block | ||||
{ | { | ||||
LOCK(cs_main); | |||||
CBlock block = CreateAndProcessBlock({funding_tx}, p2pk_scriptPubKey); | CBlock block = CreateAndProcessBlock({funding_tx}, p2pk_scriptPubKey); | ||||
BOOST_CHECK(chainActive.Tip()->GetBlockHash() == block.GetHash()); | BOOST_CHECK(chainActive.Tip()->GetBlockHash() == block.GetHash()); | ||||
BOOST_CHECK(pcoinsTip->GetBestBlock() == block.GetHash()); | BOOST_CHECK(pcoinsTip->GetBestBlock() == block.GetHash()); | ||||
} | } | ||||
// flags to test: SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY, | // flags to test: SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY, | ||||
// SCRIPT_VERIFY_CHECKSEQUENCE_VERIFY, SCRIPT_VERIFY_NULLDUMMY, uncompressed | // SCRIPT_VERIFY_CHECKSEQUENCE_VERIFY, SCRIPT_VERIFY_NULLDUMMY, uncompressed | ||||
// pubkey thing | // pubkey thing | ||||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |