@@ -266,6 +266,7 @@ Value getmininginfo(const Array& params, bool fHelp)
266
266
}
267
267
268
268
269
+ // NOTE: Unlike wallet RPC (which use BTC values), mining RPCs follow GBT (BIP 22) in using satoshi amounts
269
270
Value prioritisetransaction (const Array& params, bool fHelp )
270
271
{
271
272
if (fHelp || params.size () != 3 )
@@ -277,22 +278,20 @@ Value prioritisetransaction(const Array& params, bool fHelp)
277
278
" 2. priority delta (numeric, required) The priority to add or subtract.\n "
278
279
" The transaction selection algorithm considers the tx as it would have a higher priority.\n "
279
280
" (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n "
280
- " 3. fee delta (numeric, required) The absolute fee value to add or subtract in bitcoin .\n "
281
+ " 3. fee delta (numeric, required) The fee value (in satoshis) to add ( or subtract, if negative) .\n "
281
282
" The fee is not actually paid, only the algorithm for selecting transactions into a block\n "
282
283
" considers the transaction as it would have paid a higher (or lower) fee.\n "
283
284
" \n Result\n "
284
285
" true (boolean) Returns true\n "
285
286
" \n Examples:\n "
286
- + HelpExampleCli (" prioritisetransaction" , " \" txid\" 0.0 0.00010000 " )
287
- + HelpExampleRpc (" prioritisetransaction" , " \" txid\" , 0.0, 0.00010000 " )
287
+ + HelpExampleCli (" prioritisetransaction" , " \" txid\" 0.0 10000 " )
288
+ + HelpExampleRpc (" prioritisetransaction" , " \" txid\" , 0.0, 10000 " )
288
289
);
289
290
290
291
uint256 hash;
291
292
hash.SetHex (params[0 ].get_str ());
292
293
293
- CAmount nAmount = 0 ;
294
- if (params[2 ].get_real () != 0.0 )
295
- nAmount = AmountFromValue (params[2 ]);
294
+ CAmount nAmount = params[2 ].get_int64 ();
296
295
297
296
mempool.PrioritiseTransaction (hash, params[0 ].get_str (), params[1 ].get_real (), nAmount);
298
297
return true ;
0 commit comments