mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
fix: wrong name of arguments for RPC
This commit is contained in:
parent
c30c8f22dd
commit
af9eb81e56
@ -964,7 +964,7 @@ static RPCHelpMan getblockheaders()
|
||||
"\nIf verbose is false, each item is a string that is serialized, hex-encoded data for a single blockheader.\n"
|
||||
"If verbose is true, each item is an Object with information about a single blockheader.\n",
|
||||
{
|
||||
{"hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
||||
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
||||
{"count", RPCArg::Type::NUM, /* default */ strprintf("%s", MAX_HEADERS_RESULTS), ""},
|
||||
{"verbose", RPCArg::Type::BOOL, /* default */ "true", "true for a json object, false for the hex-encoded data"},
|
||||
},
|
||||
@ -1100,7 +1100,7 @@ static RPCHelpMan getmerkleblocks()
|
||||
"\nReturns an array of hex-encoded merkleblocks for <count> blocks starting from <hash> which match <filter>.\n",
|
||||
{
|
||||
{"filter", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The hex-encoded bloom filter"},
|
||||
{"hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
||||
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash"},
|
||||
{"count", RPCArg::Type::NUM, /* default */ strprintf("%s", MAX_HEADERS_RESULTS), ""},
|
||||
},
|
||||
RPCResult{
|
||||
|
@ -109,7 +109,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||
{ "gettransaction", 1, "include_watchonly" },
|
||||
{ "gettransaction", 2, "verbose" },
|
||||
{ "getrawtransaction", 1, "verbose" },
|
||||
{ "getrawtransactionmulti", 0, "txid_map" },
|
||||
{ "getrawtransactionmulti", 0, "transactions" },
|
||||
{ "getrawtransactionmulti", 1, "verbose" },
|
||||
{ "gettxchainlocks", 0, "txids" },
|
||||
{ "createrawtransaction", 0, "inputs" },
|
||||
|
@ -2076,7 +2076,7 @@ static const CRPCCommand commands[] =
|
||||
// --------------------- ------------------------ ----------------------- ----------
|
||||
{ "rawtransactions", "getassetunlockstatuses", &getassetunlockstatuses, {"indexes","height"} },
|
||||
{ "rawtransactions", "getrawtransaction", &getrawtransaction, {"txid","verbose","blockhash"} },
|
||||
{ "rawtransactions", "getrawtransactionmulti", &getrawtransactionmulti, {"txid_map","verbose"} },
|
||||
{ "rawtransactions", "getrawtransactionmulti", &getrawtransactionmulti, {"transactions","verbose"} },
|
||||
{ "rawtransactions", "gettxchainlocks", &gettxchainlocks, {"txids"} },
|
||||
{ "rawtransactions", "createrawtransaction", &createrawtransaction, {"inputs","outputs","locktime"} },
|
||||
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, {"hexstring"} },
|
||||
|
@ -339,7 +339,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
|
||||
# 5. valid parameters - supply txid and True for non-verbose
|
||||
assert_equal(self.nodes[0].getrawtransaction(txId, True)["hex"], rawTxSigned['hex'])
|
||||
assert_equal(self.nodes[0].getrawtransactionmulti({"0":[txId]}, True)[txId]['hex'], rawTxSigned['hex'])
|
||||
assert_equal(self.nodes[0].getrawtransactionmulti(verbose=True, transactions={"0":[txId]})[txId]['hex'], rawTxSigned['hex'])
|
||||
|
||||
# 6. invalid parameters - supply txid and string "Flase"
|
||||
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txId, "Flase")
|
||||
|
Loading…
Reference in New Issue
Block a user