Changeset View
Changeset View
Standalone View
Standalone View
src/test/miner_tests.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
static CBlockIndex CreateBlockIndex(int nHeight) { | 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) { | |||||
LOCK(g_mempool.cs); | LOCK(g_mempool.cs); | ||||
return CheckSequenceLocks(tx, flags); | return CheckSequenceLocks(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. | ||||
▲ Show 20 Lines • Show All 686 Lines • Show Last 20 Lines |