mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
mempool: Make GetMinFee() with custom size protected
The version of GetMinFee() with a custom size specification is and should only be used by tests. Mark it as protected and use a derived class exposing GetMinFee() as public in tests.
This commit is contained in:
@@ -16,6 +16,12 @@ BOOST_FIXTURE_TEST_SUITE(mempool_tests, TestingSetup)
|
||||
|
||||
static constexpr auto REMOVAL_REASON_DUMMY = MemPoolRemovalReason::REPLACED;
|
||||
|
||||
class MemPoolTest final : public CTxMemPool
|
||||
{
|
||||
public:
|
||||
using CTxMemPool::GetMinFee;
|
||||
};
|
||||
|
||||
BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
|
||||
{
|
||||
// Test CTxMemPool::remove functionality
|
||||
@@ -423,7 +429,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
|
||||
{
|
||||
CTxMemPool& pool = *Assert(m_node.mempool);
|
||||
auto& pool = static_cast<MemPoolTest&>(*Assert(m_node.mempool));
|
||||
LOCK2(cs_main, pool.cs);
|
||||
TestMemPoolEntryHelper entry;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user