Browse Source

Merge pull request #4531

ebdcc36 Add helptexts for -whitelist and rpc prioritisetransaction and switch to bitcoin instead of satoshis (Cozz Lovan)
0.10
Wladimir J. van der Laan 10 years ago
parent
commit
aaa7076937
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 1
      src/init.cpp
  2. 2
      src/rpcclient.cpp
  3. 23
      src/rpcmining.cpp

1
src/init.cpp

@ -262,6 +262,7 @@ std::string HelpMessage(HelpMessageMode mode)
#endif #endif
strUsage += " -whitebind=<addr> " + _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6") + "\n"; strUsage += " -whitebind=<addr> " + _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6") + "\n";
strUsage += " -whitelist=<netmask> " + _("Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.") + "\n"; strUsage += " -whitelist=<netmask> " + _("Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.") + "\n";
strUsage += " " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway") + "\n";
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
strUsage += "\n" + _("Wallet options:") + "\n"; strUsage += "\n" + _("Wallet options:") + "\n";

2
src/rpcclient.cpp

@ -85,6 +85,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "getrawmempool", 0 }, { "getrawmempool", 0 },
{ "estimatefee", 0 }, { "estimatefee", 0 },
{ "estimatepriority", 0 }, { "estimatepriority", 0 },
{ "prioritisetransaction", 1 },
{ "prioritisetransaction", 2 },
}; };
class CRPCConvertTable class CRPCConvertTable

23
src/rpcmining.cpp

@ -252,11 +252,30 @@ Value prioritisetransaction(const Array& params, bool fHelp)
if (fHelp || params.size() != 3) if (fHelp || params.size() != 3)
throw runtime_error( throw runtime_error(
"prioritisetransaction <txid> <priority delta> <fee delta>\n" "prioritisetransaction <txid> <priority delta> <fee delta>\n"
"Accepts the transaction into mined blocks at a higher (or lower) priority"); "Accepts the transaction into mined blocks at a higher (or lower) priority\n"
"\nArguments:\n"
"1. \"txid\" (string, required) The transaction id.\n"
"2. priority delta (numeric, required) The priority to add or subtract.\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 absolute fee value to add or subtract in bitcoin.\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"
"\nResult\n"
"true (boolean) Returns true\n"
"\nExamples:\n"
+ HelpExampleCli("prioritisetransaction", "\"txid\" 0.0 0.00010000")
+ HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 0.00010000")
);
uint256 hash; uint256 hash;
hash.SetHex(params[0].get_str()); hash.SetHex(params[0].get_str());
mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), params[2].get_int64());
int64_t nAmount = 0;
if (params[2].get_real() != 0.0)
nAmount = AmountFromValue(params[2]);
mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), nAmount);
return true; return true;
} }

Loading…
Cancel
Save