Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
// Note that this test assumes blockprioritysize is 0. | // Note that this test assumes blockprioritysize is 0. | ||||
void TestPackageSelection(const CChainParams &chainparams, CScript scriptPubKey, | void TestPackageSelection(const CChainParams &chainparams, CScript scriptPubKey, | ||||
std::vector<CTransactionRef> &txFirst) { | std::vector<CTransactionRef> &txFirst) { | ||||
// Test the ancestor feerate transaction selection. | // Test the ancestor feerate transaction selection. | ||||
TestMemPoolEntryHelper entry; | TestMemPoolEntryHelper entry; | ||||
GlobalConfig config; | GlobalConfig config; | ||||
// these 3 tests assume blockprioritysize is 0. | |||||
ForceSetArg("-blockprioritysize", "0"); | |||||
// Test that a medium fee transaction will be selected after a higher fee | // Test that a medium fee transaction will be selected after a higher fee | ||||
// rate package with a low fee rate parent. | // rate package with a low fee rate parent. | ||||
CMutableTransaction tx; | CMutableTransaction tx; | ||||
tx.vin.resize(1); | tx.vin.resize(1); | ||||
tx.vin[0].scriptSig = CScript() << OP_1; | tx.vin[0].scriptSig = CScript() << OP_1; | ||||
tx.vin[0].prevout.hash = txFirst[0]->GetId(); | tx.vin[0].prevout.hash = txFirst[0]->GetId(); | ||||
tx.vin[0].prevout.n = 0; | tx.vin[0].prevout.n = 0; | ||||
tx.vout.resize(1); | tx.vout.resize(1); | ||||
▲ Show 20 Lines • Show All 685 Lines • Show Last 20 Lines |