@ -258,31 +258,28 @@ UniValue getmininginfo(const JSONRPCRequest& request)
// NOTE: Unlike wallet RPC (which use BTC values), mining RPCs follow GBT (BIP 22) in using satoshi amounts
// NOTE: Unlike wallet RPC (which use BTC values), mining RPCs follow GBT (BIP 22) in using satoshi amounts
UniValue prioritisetransaction ( const JSONRPCRequest & request )
UniValue prioritisetransaction ( const JSONRPCRequest & request )
{
{
if ( request . fHelp | | request . params . size ( ) ! = 3 )
if ( request . fHelp | | request . params . size ( ) ! = 2 )
throw runtime_error (
throw runtime_error (
" prioritisetransaction <txid> <priority delta> < fee delta> \n "
" prioritisetransaction <txid> <fee delta> \n "
" Accepts the transaction into mined blocks at a higher (or lower) priority \n "
" Accepts the transaction into mined blocks at a higher (or lower) priority \n "
" \n Arguments: \n "
" \n Arguments: \n "
" 1. \" txid \" (string, required) The transaction id. \n "
" 1. \" txid \" (string, required) The transaction id. \n "
" 2. priority_delta (numeric, required) The priority to add or subtract. \n "
" 2. fee_delta (numeric, required) The fee value (in satoshis) to add (or subtract, if negative). \n "
" The transaction selection algorithm considers the tx as it would have a higher priority. \n "
" (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n "
" 3. fee_delta (numeric, required) The fee value (in satoshis) to add (or subtract, if negative). \n "
" The fee is not actually paid, only the algorithm for selecting transactions into a block \n "
" The fee is not actually paid, only the algorithm for selecting transactions into a block \n "
" considers the transaction as it would have paid a higher (or lower) fee. \n "
" considers the transaction as it would have paid a higher (or lower) fee. \n "
" \n Result: \n "
" \n Result: \n "
" true (boolean) Returns true \n "
" true (boolean) Returns true \n "
" \n Examples: \n "
" \n Examples: \n "
+ HelpExampleCli ( " prioritisetransaction " , " \" txid \" 0.0 10000 " )
+ HelpExampleCli ( " prioritisetransaction " , " \" txid \" 10000 " )
+ HelpExampleRpc ( " prioritisetransaction " , " \" txid \" , 0.0, 10000 " )
+ HelpExampleRpc ( " prioritisetransaction " , " \" txid \" , 10000 " )
) ;
) ;
LOCK ( cs_main ) ;
LOCK ( cs_main ) ;
uint256 hash = ParseHashStr ( request . params [ 0 ] . get_str ( ) , " txid " ) ;
uint256 hash = ParseHashStr ( request . params [ 0 ] . get_str ( ) , " txid " ) ;
CAmount nAmount = request . params [ 2 ] . get_int64 ( ) ;
CAmount nAmount = request . params [ 1 ] . get_int64 ( ) ;
mempool . PrioritiseTransaction ( hash , request . params [ 1 ] . get_real ( ) , nAmount ) ;
mempool . PrioritiseTransaction ( hash , nAmount ) ;
return true ;
return true ;
}
}
@ -853,7 +850,7 @@ static const CRPCCommand commands[] =
// --------------------- ------------------------ ----------------------- ----------
// --------------------- ------------------------ ----------------------- ----------
{ " mining " , " getnetworkhashps " , & getnetworkhashps , true , { " nblocks " , " height " } } ,
{ " mining " , " getnetworkhashps " , & getnetworkhashps , true , { " nblocks " , " height " } } ,
{ " mining " , " getmininginfo " , & getmininginfo , true , { } } ,
{ " mining " , " getmininginfo " , & getmininginfo , true , { } } ,
{ " mining " , " prioritisetransaction " , & prioritisetransaction , true , { " txid " , " priority_delta " , " fee_delta " } } ,
{ " mining " , " prioritisetransaction " , & prioritisetransaction , true , { " txid " , " fee_delta " } } ,
{ " mining " , " getblocktemplate " , & getblocktemplate , true , { " template_request " } } ,
{ " mining " , " getblocktemplate " , & getblocktemplate , true , { " template_request " } } ,
{ " mining " , " submitblock " , & submitblock , true , { " hexdata " , " parameters " } } ,
{ " mining " , " submitblock " , & submitblock , true , { " hexdata " , " parameters " } } ,