Browse Source

[rpc] fundrawtransaction: Fix help text and interface

0.13
MarcoFalke 9 years ago
parent
commit
faf82e8fc8
  1. 2
      qa/rpc-tests/fundrawtransaction.py
  2. 4
      src/wallet/rpcwallet.cpp

2
qa/rpc-tests/fundrawtransaction.py

@ -681,7 +681,7 @@ class RawTransactionsTest(BitcoinTestFramework): @@ -681,7 +681,7 @@ class RawTransactionsTest(BitcoinTestFramework):
inputs = []
outputs = {self.nodes[2].getnewaddress() : 1}
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})
result3 = self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 10000})
assert_equal(result['fee']*2, result2['fee'])

4
src/wallet/rpcwallet.cpp

@ -2369,13 +2369,13 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp) @@ -2369,13 +2369,13 @@ UniValue fundrawtransaction(const UniValue& params, bool fHelp)
" \"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"
" \"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"
" for backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}\n"
"\nResult:\n"
"{\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"
"}\n"
"\"hex\" \n"

Loading…
Cancel
Save