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 23
23
#include < node/context.h>
24
24
#include < node/miner.h>
25
25
#include < node/warnings.h>
26
+ #include < policy/ephemeral_policy.h>
26
27
#include < pow.h>
27
28
#include < rpc/blockchain.h>
28
29
#include < rpc/mining.h>
@@ -491,7 +492,15 @@ static RPCHelpMan prioritisetransaction()
491
492
throw JSONRPCError (RPC_INVALID_PARAMETER, " Priority is no longer supported, dummy argument to prioritisetransaction must be 0." );
492
493
}
493
494
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);
495
504
return true ;
496
505
},
497
506
};
You can’t perform that action at this time.
0 commit comments