mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
[rpc] Remove priorityDelta from prioritisetransaction
This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta). The function prioritiseTransaction is also updated.
This commit is contained in:
parent
49be7e1bef
commit
f9b9371c60
9 changed files with 38 additions and 46 deletions
|
|
@ -720,8 +720,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
|
|||
CAmount nFees = nValueIn-nValueOut;
|
||||
// nModifiedFees includes any fee deltas from PrioritiseTransaction
|
||||
CAmount nModifiedFees = nFees;
|
||||
double nPriorityDummy = 0;
|
||||
pool.ApplyDeltas(hash, nPriorityDummy, nModifiedFees);
|
||||
pool.ApplyDelta(hash, nModifiedFees);
|
||||
|
||||
CAmount inChainInputValue;
|
||||
double dPriority = view.GetPriority(tx, chainActive.Height(), inChainInputValue);
|
||||
|
|
@ -4184,7 +4183,6 @@ bool LoadMempool(void)
|
|||
}
|
||||
uint64_t num;
|
||||
file >> num;
|
||||
double prioritydummy = 0;
|
||||
while (num--) {
|
||||
CTransactionRef tx;
|
||||
int64_t nTime;
|
||||
|
|
@ -4195,7 +4193,7 @@ bool LoadMempool(void)
|
|||
|
||||
CAmount amountdelta = nFeeDelta;
|
||||
if (amountdelta) {
|
||||
mempool.PrioritiseTransaction(tx->GetHash(), prioritydummy, amountdelta);
|
||||
mempool.PrioritiseTransaction(tx->GetHash(), amountdelta);
|
||||
}
|
||||
CValidationState state;
|
||||
if (nTime + nExpiryTimeout > nNow) {
|
||||
|
|
@ -4216,7 +4214,7 @@ bool LoadMempool(void)
|
|||
file >> mapDeltas;
|
||||
|
||||
for (const auto& i : mapDeltas) {
|
||||
mempool.PrioritiseTransaction(i.first, prioritydummy, i.second);
|
||||
mempool.PrioritiseTransaction(i.first, i.second);
|
||||
}
|
||||
} catch (const std::exception& e) {
|
||||
LogPrintf("Failed to deserialize mempool data on disk: %s. Continuing anyway.\n", e.what());
|
||||
|
|
@ -4237,7 +4235,7 @@ void DumpMempool(void)
|
|||
{
|
||||
LOCK(mempool.cs);
|
||||
for (const auto &i : mempool.mapDeltas) {
|
||||
mapDeltas[i.first] = i.second.second;
|
||||
mapDeltas[i.first] = i.second;
|
||||
}
|
||||
vinfo = mempool.infoAll();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue