mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Don't declare de facto const member functions as non-const
This commit is contained in:
@@ -26,7 +26,7 @@ static const unsigned int QUEUE_BATCH_SIZE = 128;
|
||||
static const int SCRIPT_CHECK_THREADS = 3;
|
||||
|
||||
struct FakeCheck {
|
||||
bool operator()()
|
||||
bool operator()() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ struct FailingCheck {
|
||||
bool fails;
|
||||
FailingCheck(bool _fails) : fails(_fails){};
|
||||
FailingCheck() : fails(true){};
|
||||
bool operator()()
|
||||
bool operator()() const
|
||||
{
|
||||
return !fails;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ struct UniqueCheck {
|
||||
struct MemoryCheck {
|
||||
static std::atomic<size_t> fake_allocated_memory;
|
||||
bool b {false};
|
||||
bool operator()()
|
||||
bool operator()() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ struct FrozenCleanupCheck {
|
||||
// Freezing can't be the default initialized behavior given how the queue
|
||||
// swaps in default initialized Checks.
|
||||
bool should_freeze {false};
|
||||
bool operator()()
|
||||
bool operator()() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -231,12 +231,12 @@ TestChain100Setup::~TestChain100Setup()
|
||||
gArgs.ForceSetArg("-segwitheight", "0");
|
||||
}
|
||||
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction& tx)
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction& tx) const
|
||||
{
|
||||
return FromTx(MakeTransactionRef(tx));
|
||||
}
|
||||
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef& tx)
|
||||
CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransactionRef& tx) const
|
||||
{
|
||||
return CTxMemPoolEntry(tx, nFee, nTime, nHeight,
|
||||
spendsCoinbase, sigOpCost, lp);
|
||||
|
||||
@@ -138,8 +138,8 @@ struct TestMemPoolEntryHelper
|
||||
nFee(0), nTime(0), nHeight(1),
|
||||
spendsCoinbase(false), sigOpCost(4) { }
|
||||
|
||||
CTxMemPoolEntry FromTx(const CMutableTransaction& tx);
|
||||
CTxMemPoolEntry FromTx(const CTransactionRef& tx);
|
||||
CTxMemPoolEntry FromTx(const CMutableTransaction& tx) const;
|
||||
CTxMemPoolEntry FromTx(const CTransactionRef& tx) const;
|
||||
|
||||
// Change the default value
|
||||
TestMemPoolEntryHelper &Fee(CAmount _fee) { nFee = _fee; return *this; }
|
||||
|
||||
Reference in New Issue
Block a user