Remove unnecessary min fee argument in CTxMemPool constructor
This commit is contained in:
parent
2a7b56cc0e
commit
ad82cb06ce
7 changed files with 13 additions and 13 deletions
|
@ -97,7 +97,7 @@ static void MempoolEviction(benchmark::State& state)
|
||||||
tx7.vout[1].scriptPubKey = CScript() << OP_7 << OP_EQUAL;
|
tx7.vout[1].scriptPubKey = CScript() << OP_7 << OP_EQUAL;
|
||||||
tx7.vout[1].nValue = 10 * COIN;
|
tx7.vout[1].nValue = 10 * COIN;
|
||||||
|
|
||||||
CTxMemPool pool(CFeeRate(1000));
|
CTxMemPool pool;
|
||||||
|
|
||||||
while (state.KeepRunning()) {
|
while (state.KeepRunning()) {
|
||||||
AddTx(tx1, 10000LL, pool);
|
AddTx(tx1, 10000LL, pool);
|
||||||
|
|
|
@ -55,7 +55,7 @@ static CBlock BuildBlockTestCase() {
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(SimpleRoundTripTest)
|
BOOST_AUTO_TEST_CASE(SimpleRoundTripTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(0));
|
CTxMemPool pool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
CBlock block(BuildBlockTestCase());
|
CBlock block(BuildBlockTestCase());
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ public:
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
|
BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(0));
|
CTxMemPool pool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
CBlock block(BuildBlockTestCase());
|
CBlock block(BuildBlockTestCase());
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
|
BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(0));
|
CTxMemPool pool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
CBlock block(BuildBlockTestCase());
|
CBlock block(BuildBlockTestCase());
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
|
BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(0));
|
CTxMemPool pool;
|
||||||
CMutableTransaction coinbase;
|
CMutableTransaction coinbase;
|
||||||
coinbase.vin.resize(1);
|
coinbase.vin.resize(1);
|
||||||
coinbase.vin[0].scriptSig.resize(10);
|
coinbase.vin[0].scriptSig.resize(10);
|
||||||
|
|
|
@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CTxMemPool testPool(CFeeRate(0));
|
CTxMemPool testPool;
|
||||||
|
|
||||||
// Nothing in pool, remove should do nothing:
|
// Nothing in pool, remove should do nothing:
|
||||||
unsigned int poolSize = testPool.size();
|
unsigned int poolSize = testPool.size();
|
||||||
|
@ -118,7 +118,7 @@ void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
|
BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(0));
|
CTxMemPool pool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
|
|
||||||
/* 3rd highest fee */
|
/* 3rd highest fee */
|
||||||
|
@ -320,7 +320,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
|
BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(0));
|
CTxMemPool pool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
|
|
||||||
/* 3rd highest fee */
|
/* 3rd highest fee */
|
||||||
|
@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
|
BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
|
||||||
{
|
{
|
||||||
CTxMemPool pool(CFeeRate(1000));
|
CTxMemPool pool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
entry.dPriority = 10.0;
|
entry.dPriority = 10.0;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ BOOST_FIXTURE_TEST_SUITE(policyestimator_tests, BasicTestingSetup)
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
|
||||||
{
|
{
|
||||||
CTxMemPool mpool(CFeeRate(1000));
|
CTxMemPool mpool;
|
||||||
TestMemPoolEntryHelper entry;
|
TestMemPoolEntryHelper entry;
|
||||||
CAmount basefee(2000);
|
CAmount basefee(2000);
|
||||||
CAmount deltaFee(100);
|
CAmount deltaFee(100);
|
||||||
|
|
|
@ -348,7 +348,7 @@ void CTxMemPoolEntry::UpdateAncestorState(int64_t modifySize, CAmount modifyFee,
|
||||||
assert(int(nSigOpCostWithAncestors) >= 0);
|
assert(int(nSigOpCostWithAncestors) >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) :
|
CTxMemPool::CTxMemPool() :
|
||||||
nTransactionsUpdated(0)
|
nTransactionsUpdated(0)
|
||||||
{
|
{
|
||||||
_clear(); //lock free clear
|
_clear(); //lock free clear
|
||||||
|
|
|
@ -502,7 +502,7 @@ public:
|
||||||
|
|
||||||
/** Create a new CTxMemPool.
|
/** Create a new CTxMemPool.
|
||||||
*/
|
*/
|
||||||
CTxMemPool(const CFeeRate& _minReasonableRelayFee);
|
CTxMemPool();
|
||||||
~CTxMemPool();
|
~CTxMemPool();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -83,7 +83,7 @@ uint256 hashAssumeValid;
|
||||||
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
|
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
|
||||||
CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
|
CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
|
||||||
|
|
||||||
CTxMemPool mempool(::minRelayTxFee);
|
CTxMemPool mempool;
|
||||||
|
|
||||||
static void CheckBlockIndex(const Consensus::Params& consensusParams);
|
static void CheckBlockIndex(const Consensus::Params& consensusParams);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue