aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/rawtransaction.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-12-10 14:02:15 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-12-10 14:02:21 -0500
commit5f23460c7e316fe7c944680f3feff07ebb867f70 (patch)
tree98e72243638bca0090fdffdf75f5a576726ab739 /src/rpc/rawtransaction.cpp
parent234b99b9210c0a18fca10dfa75331a68f8e74a13 (diff)
parentfa0c24c96e9937f666dcdd83d12145720c7b0329 (diff)
Merge #14877: rpc: Document default values for optional arguments
fa0c24c96e rpc: Document default values for optional arguments (MarcoFalke) Pull request description: Tree-SHA512: e1f5ea67d7ac67526ae87bffaeb308a9ad68632e161fe0148cd431a340bb7a30def18f1dbc7e98c6c1c269ac8942fd5d5334c85c48e4fb1cead70a42536b6eef
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r--src/rpc/rawtransaction.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 472b65f975..370ae8e4d7 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -81,7 +81,7 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
{
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction id"},
{"verbose", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "false", "If false, return a string, otherwise return a json object"},
- {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, /* default_val */ "", "The block in which to look for the transaction"},
+ {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, /* default_val */ "null", "The block in which to look for the transaction"},
}}
.ToString() +
"\nResult (if verbose is not set or set to false):\n"
@@ -218,7 +218,7 @@ static UniValue gettxoutproof(const JSONRPCRequest& request)
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "A transaction hash"},
},
},
- {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, /* default_val */ "", "If specified, looks for txid in the block with this hash"},
+ {"blockhash", RPCArg::Type::STR_HEX, /* opt */ true, /* default_val */ "null", "If specified, looks for txid in the block with this hash"},
}}
.ToString() +
"\nResult:\n"
@@ -465,11 +465,11 @@ static UniValue createrawtransaction(const JSONRPCRequest& request)
{
{"inputs", RPCArg::Type::ARR, /* opt */ false, /* default_val */ "", "A json array of json objects",
{
- {"", RPCArg::Type::OBJ, /* opt */ false, /* default_val */ "", "",
+ {"", RPCArg::Type::OBJ, /* opt */ true, /* default_val */ "", "",
{
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction id"},
{"vout", RPCArg::Type::NUM, /* opt */ false, /* default_val */ "", "The output number"},
- {"sequence", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "The sequence number"},
+ {"sequence", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "depends on the value of the 'replaceable' and 'locktime' arguments", "The sequence number"},
},
},
},
@@ -528,7 +528,7 @@ static UniValue decoderawtransaction(const JSONRPCRequest& request)
"\nReturn a JSON object representing the serialized, hex-encoded transaction.\n",
{
{"hexstring", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction hex string"},
- {"iswitness", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "", "Whether the transaction hex is a serialized witness transaction\n"
+ {"iswitness", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "depends on heuristic tests", "Whether the transaction hex is a serialized witness transaction\n"
" If iswitness is not present, heuristic tests will be used in decoding"},
}}
.ToString() +
@@ -932,14 +932,14 @@ static UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
{"privatekey", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "private key in base58-encoding"},
},
},
- {"prevtxs", RPCArg::Type::ARR, /* opt */ true, /* default_val */ "", "A json array of previous dependent transaction outputs",
+ {"prevtxs", RPCArg::Type::ARR, /* opt */ true, /* default_val */ "null", "A json array of previous dependent transaction outputs",
{
{"", RPCArg::Type::OBJ, /* opt */ true, /* default_val */ "", "",
{
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction id"},
{"vout", RPCArg::Type::NUM, /* opt */ false, /* default_val */ "", "The output number"},
{"scriptPubKey", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "script key"},
- {"redeemScript", RPCArg::Type::STR_HEX, /* opt */ true, /* default_val */ "", "(required for P2SH or P2WSH) redeem script"},
+ {"redeemScript", RPCArg::Type::STR_HEX, /* opt */ true, /* default_val */ "omitted", "(required for P2SH or P2WSH) redeem script"},
{"amount", RPCArg::Type::AMOUNT, /* opt */ false, /* default_val */ "", "The amount spent"},
},
},
@@ -1612,7 +1612,7 @@ UniValue createpsbt(const JSONRPCRequest& request)
{
{"txid", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The transaction id"},
{"vout", RPCArg::Type::NUM, /* opt */ false, /* default_val */ "", "The output number"},
- {"sequence", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "", "The sequence number"},
+ {"sequence", RPCArg::Type::NUM, /* opt */ true, /* default_val */ "depends on the value of the 'replaceable' and 'locktime' arguments", "The sequence number"},
},
},
},
@@ -1684,7 +1684,7 @@ UniValue converttopsbt(const JSONRPCRequest& request)
{"hexstring", RPCArg::Type::STR_HEX, /* opt */ false, /* default_val */ "", "The hex string of a raw transaction"},
{"permitsigdata", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "false", "If true, any signatures in the input will be discarded and conversion.\n"
" will continue. If false, RPC will fail if any signatures are present."},
- {"iswitness", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "", "Whether the transaction hex is a serialized witness transaction.\n"
+ {"iswitness", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "depends on heuristic tests", "Whether the transaction hex is a serialized witness transaction.\n"
" If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserializaion\n"
" will be tried. If false, only non-witness deserialization will be tried. Only has an effect if\n"
" permitsigdata is true."},