[rpc] fundrawtransaction: Fix help text and interface

This commit is contained in:
MarcoFalke 2016-06-03 19:07:08 +02:00
parent 52c3f348be
commit faf82e8fc8
2 changed files with 3 additions and 3 deletions

View file

@ -681,7 +681,7 @@ class RawTransactionsTest(BitcoinTestFramework):
inputs = [] inputs = []
outputs = {self.nodes[2].getnewaddress() : 1} outputs = {self.nodes[2].getnewaddress() : 1}
rawtx = self.nodes[3].createrawtransaction(inputs, outputs) rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
result = self.nodes[3].fundrawtransaction(rawtx, ) result = self.nodes[3].fundrawtransaction(rawtx) # 1000 sat via settxfee
result2 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2000}) result2 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2000})
result3 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 10000}) result3 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 10000})
assert_equal(result['fee']*2, result2['fee']) assert_equal(result['fee']*2, result2['fee'])

View file

@ -2369,13 +2369,13 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp)
" \"changePosition\" (numeric, optional, default random) The index of the change output\n" " \"changePosition\" (numeric, optional, default random) The index of the change output\n"
" \"includeWatching\" (boolean, optional, default false) Also select inputs which are watch only\n" " \"includeWatching\" (boolean, optional, default false) Also select inputs which are watch only\n"
" \"lockUnspents\" (boolean, optional, default false) Lock selected unspent outputs\n" " \"lockUnspents\" (boolean, optional, default false) Lock selected unspent outputs\n"
" \"feeRate\" (numeric, optional, default 0=estimate) Set a specific feerate (fee per KB)\n" " \"feeRate\" (numeric, optional, default not set: makes wallet determine the fee) Set a specific feerate (satoshis per KB)\n"
" }\n" " }\n"
" for backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}\n" " for backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}\n"
"\nResult:\n" "\nResult:\n"
"{\n" "{\n"
" \"hex\": \"value\", (string) The resulting raw transaction (hex-encoded string)\n" " \"hex\": \"value\", (string) The resulting raw transaction (hex-encoded string)\n"
" \"fee\": n, (numeric) Fee the resulting transaction pays\n" " \"fee\": n, (numeric) Fee in " + CURRENCY_UNIT + " the resulting transaction pays\n"
" \"changepos\": n (numeric) The position of the added change output, or -1\n" " \"changepos\": n (numeric) The position of the added change output, or -1\n"
"}\n" "}\n"
"\"hex\" \n" "\"hex\" \n"