Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | static CBlockIndex CreateBlockIndex(int nHeight) { | ||||
CBlockIndex index; | CBlockIndex index; | ||||
index.nHeight = nHeight; | index.nHeight = nHeight; | ||||
index.pprev = chainActive.Tip(); | index.pprev = chainActive.Tip(); | ||||
return index; | return index; | ||||
} | } | ||||
static bool TestSequenceLocks(const CTransaction &tx, int flags) | static bool TestSequenceLocks(const CTransaction &tx, int flags) | ||||
EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | EXCLUSIVE_LOCKS_REQUIRED(cs_main) { | ||||
LOCK(g_mempool.cs); | LOCK(::g_mempool.cs); | ||||
return CheckSequenceLocks(tx, flags); | return CheckSequenceLocks(::g_mempool, tx, flags); | ||||
} | } | ||||
// Test suite for ancestor feerate transaction selection. | // Test suite for ancestor feerate transaction selection. | ||||
// Implemented as an additional function, rather than a separate test case, to | // Implemented as an additional function, rather than a separate test case, to | ||||
// allow reusing the blockchain created in CreateNewBlock_validity. | // allow reusing the blockchain created in CreateNewBlock_validity. | ||||
// Note that this test assumes blockprioritypercentage is 0. | // Note that this test assumes blockprioritypercentage is 0. | ||||
static void TestPackageSelection(const CChainParams &chainparams, | static void TestPackageSelection(const CChainParams &chainparams, | ||||
CScript scriptPubKey, | CScript scriptPubKey, | ||||
▲ Show 20 Lines • Show All 681 Lines • Show Last 20 Lines |