Merge b0222bbb49 into merged_master (Bitcoin PR bitcoin/bitcoin#30239)

This commit is contained in:
ivanlele 2026-04-03 08:45:56 +00:00
commit 744c517dac
No known key found for this signature in database
22 changed files with 1236 additions and 10 deletions

View file

@ -25,6 +25,7 @@
#include <node/miner.h>
#include <policy/policy.h>
#include <node/warnings.h>
#include <policy/ephemeral_policy.h>
#include <pow.h>
#include <random.h>
#include <rpc/blockchain.h>
@ -515,7 +516,15 @@ static RPCHelpMan prioritisetransaction()
throw JSONRPCError(RPC_INVALID_PARAMETER, "Priority is no longer supported, dummy argument to prioritisetransaction must be 0.");
}
EnsureAnyMemPool(request.context).PrioritiseTransaction(hash, nAmount);
CTxMemPool& mempool = EnsureAnyMemPool(request.context);
// Non-0 fee dust transactions are not allowed for entry, and modification not allowed afterwards
const auto& tx = mempool.get(hash);
if (tx && HasDust(tx, mempool.m_opts.dust_relay_feerate)) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Priority is not supported for transactions with dust outputs.");
}
mempool.PrioritiseTransaction(hash, nAmount);
return true;
},
};