File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 2323#include < node/context.h>
2424#include < node/miner.h>
2525#include < node/warnings.h>
26+ #include < policy/ephemeral_policy.h>
2627#include < pow.h>
2728#include < rpc/blockchain.h>
2829#include < rpc/mining.h>
@@ -491,7 +492,15 @@ static RPCHelpMan prioritisetransaction()
491492 throw JSONRPCError (RPC_INVALID_PARAMETER, " Priority is no longer supported, dummy argument to prioritisetransaction must be 0." );
492493 }
493494
494- EnsureAnyMemPool (request.context ).PrioritiseTransaction (hash, nAmount);
495+ CTxMemPool& mempool = EnsureAnyMemPool (request.context );
496+
497+ // Non-0 fee dust transactions are not allowed for entry, and modification not allowed afterwards
498+ const auto & tx = mempool.get (hash);
499+ if (tx && HasDust (tx, mempool.m_opts .dust_relay_feerate )) {
500+ throw JSONRPCError (RPC_INVALID_PARAMETER, " Priority is not supported for transactions with dust outputs." );
501+ }
502+
503+ mempool.PrioritiseTransaction (hash, nAmount);
495504 return true ;
496505},
497506 };
You can’t perform that action at this time.
0 commit comments