Changeset View
Changeset View
Standalone View
Standalone View
src/txmempool.cpp
Show First 20 Lines • Show All 956 Lines • ▼ Show 20 Lines | uint64_t maxMempoolSize = | ||||
gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; | gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; | ||||
// minerPolicy uses recent blocks to figure out a reasonable fee. This | // minerPolicy uses recent blocks to figure out a reasonable fee. This | ||||
// may disagree with the rollingMinimumFeerate under certain scenarios | // may disagree with the rollingMinimumFeerate under certain scenarios | ||||
// where the mempool increases rapidly, or blocks are being mined which | // where the mempool increases rapidly, or blocks are being mined which | ||||
// do not contain propagated transactions. | // do not contain propagated transactions. | ||||
return std::max(GetConfig().GetMinFeePerKB(), GetMinFee(maxMempoolSize)); | return std::max(GetConfig().GetMinFeePerKB(), GetMinFee(maxMempoolSize)); | ||||
} | } | ||||
CFeeRate CTxMemPool::estimateSmartFee(int nBlocks, | |||||
int *answerFoundAtBlocks) const { | |||||
if (answerFoundAtBlocks != nullptr) { | |||||
*answerFoundAtBlocks = 1; | |||||
} | |||||
// estimateSmartFee already includes the GetMinFee check, this is the | |||||
// reason it takes `*this`. It does not need std::max as above. | |||||
return estimateFee(nBlocks); | |||||
} | |||||
void CTxMemPool::PrioritiseTransaction(const uint256 hash, | void CTxMemPool::PrioritiseTransaction(const uint256 hash, | ||||
const std::string strHash, | const std::string strHash, | ||||
double dPriorityDelta, | double dPriorityDelta, | ||||
const Amount nFeeDelta) { | const Amount nFeeDelta) { | ||||
{ | { | ||||
LOCK(cs); | LOCK(cs); | ||||
TXModifier &deltas = mapDeltas[hash]; | TXModifier &deltas = mapDeltas[hash]; | ||||
deltas.first += dPriorityDelta; | deltas.first += dPriorityDelta; | ||||
▲ Show 20 Lines • Show All 423 Lines • Show Last 20 Lines |