Removed redundant parameter from mempool.PrioritiseTransaction
(Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar)
This commit is contained in:
parent
390a39bb5c
commit
eaea2bbb41
4 changed files with 6 additions and 6 deletions
|
@ -282,7 +282,7 @@ UniValue prioritisetransaction(const JSONRPCRequest& request)
|
|||
uint256 hash = ParseHashStr(request.params[0].get_str(), "txid");
|
||||
CAmount nAmount = request.params[2].get_int64();
|
||||
|
||||
mempool.PrioritiseTransaction(hash, request.params[0].get_str(), request.params[1].get_real(), nAmount);
|
||||
mempool.PrioritiseTransaction(hash, request.params[1].get_real(), nAmount);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -920,7 +920,7 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
|
|||
return true;
|
||||
}
|
||||
|
||||
void CTxMemPool::PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount& nFeeDelta)
|
||||
void CTxMemPool::PrioritiseTransaction(const uint256& hash, double dPriorityDelta, const CAmount& nFeeDelta)
|
||||
{
|
||||
{
|
||||
LOCK(cs);
|
||||
|
@ -940,7 +940,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256 hash, const std::string str
|
|||
}
|
||||
}
|
||||
}
|
||||
LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash, dPriorityDelta, FormatMoney(nFeeDelta));
|
||||
LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", hash.ToString(), dPriorityDelta, FormatMoney(nFeeDelta));
|
||||
}
|
||||
|
||||
void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta) const
|
||||
|
|
|
@ -555,7 +555,7 @@ public:
|
|||
bool HasNoInputsOf(const CTransaction& tx) const;
|
||||
|
||||
/** Affect CreateNewBlock prioritisation of transactions */
|
||||
void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount& nFeeDelta);
|
||||
void PrioritiseTransaction(const uint256& hash, double dPriorityDelta, const CAmount& nFeeDelta);
|
||||
void ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta) const;
|
||||
void ClearPrioritisation(const uint256 hash);
|
||||
|
||||
|
|
|
@ -4211,7 +4211,7 @@ bool LoadMempool(void)
|
|||
|
||||
CAmount amountdelta = nFeeDelta;
|
||||
if (amountdelta) {
|
||||
mempool.PrioritiseTransaction(tx->GetHash(), tx->GetHash().ToString(), prioritydummy, amountdelta);
|
||||
mempool.PrioritiseTransaction(tx->GetHash(), prioritydummy, amountdelta);
|
||||
}
|
||||
CValidationState state;
|
||||
if (nTime + nExpiryTimeout > nNow) {
|
||||
|
@ -4232,7 +4232,7 @@ bool LoadMempool(void)
|
|||
file >> mapDeltas;
|
||||
|
||||
for (const auto& i : mapDeltas) {
|
||||
mempool.PrioritiseTransaction(i.first, i.first.ToString(), prioritydummy, i.second);
|
||||
mempool.PrioritiseTransaction(i.first, prioritydummy, i.second);
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
LogPrintf("Failed to deserialize mempool data on disk: %s. Continuing anyway.\n", e.what());
|
||||
|
|
Loading…
Reference in a new issue