diff options
author | Cozz Lovan <cozzlovan@yahoo.com> | 2014-07-15 02:11:55 +0200 |
---|---|---|
committer | Cozz Lovan <cozzlovan@yahoo.com> | 2014-07-15 05:20:52 +0200 |
commit | ebdcc360b65816f7ad7cdedce6a1114d5e014b7b (patch) | |
tree | fa928b5d5e693649e46c102af10532b289b2d31b /src/rpcmining.cpp | |
parent | bdd5b587fc7fd1b4dda479c4aad15c874b22e8f3 (diff) |
Add helptexts for -whitelist and rpc prioritisetransaction and switch to bitcoin instead of satoshis
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r-- | src/rpcmining.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 6f72ea7404..cbb4ab2f8b 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -252,11 +252,30 @@ Value prioritisetransaction(const Array& params, bool fHelp) if (fHelp || params.size() != 3) throw runtime_error( "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; 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; } |