mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
scripted-diff: Add missing spaces in RPCResult, Fix type names
This makes the rendered diff smaller when the RPCResult is machine generated later on -BEGIN VERIFY SCRIPT- # Add space after dictionary key and before colon sed -i --regexp-extended -e 's/(^ +" +\\"[a-zA-Z_]+\\"): ?/\1 : /g' $(git grep -l '\\":') # Rename (array) to (json array) sed -i -e 's/ (array) / (json array) /g' $(git grep -l '(array)' ./src) # Rename (object) to (json object) sed -i -e 's/ (object) / (json object) /g' $(git grep -l '(object)' ./src) # Rename (bool) to (boolean) sed -i -e 's/ (bool) / (boolean) /g' $(git grep -l '(bool)' ./src) # Rename (int) to (numeric) sed -i -e 's/ (int) / (numeric) /g' $(git grep -l '(int)' ./src) -END VERIFY SCRIPT-
This commit is contained in:
@@ -98,7 +98,7 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
},
|
||||
RPCResult{"if verbose is set to true",
|
||||
"{\n"
|
||||
" \"in_active_chain\": b, (bool) Whether specified block is in the active chain or not (only present with explicit \"blockhash\" argument)\n"
|
||||
" \"in_active_chain\" : b, (boolean) Whether specified block is in the active chain or not (only present with explicit \"blockhash\" argument)\n"
|
||||
" \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n"
|
||||
" \"txid\" : \"id\", (string) The transaction id (same as provided)\n"
|
||||
" \"hash\" : \"id\", (string) The transaction hash (differs from txid for witness transactions)\n"
|
||||
@@ -109,14 +109,14 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
" \"locktime\" : ttt, (numeric) The lock time\n"
|
||||
" \"vin\" : [ (array of json objects)\n"
|
||||
" {\n"
|
||||
" \"txid\": \"id\", (string) The transaction id\n"
|
||||
" \"vout\": n, (numeric) \n"
|
||||
" \"scriptSig\": { (json object) The script\n"
|
||||
" \"asm\": \"asm\", (string) asm\n"
|
||||
" \"hex\": \"hex\" (string) hex\n"
|
||||
" \"txid\" : \"id\", (string) The transaction id\n"
|
||||
" \"vout\" : n, (numeric) \n"
|
||||
" \"scriptSig\" : { (json object) The script\n"
|
||||
" \"asm\" : \"asm\", (string) asm\n"
|
||||
" \"hex\" : \"hex\" (string) hex\n"
|
||||
" },\n"
|
||||
" \"sequence\": n (numeric) The script sequence number\n"
|
||||
" \"txinwitness\": [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n"
|
||||
" \"sequence\" : n (numeric) The script sequence number\n"
|
||||
" \"txinwitness\" : [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
@@ -442,14 +442,14 @@ static UniValue decoderawtransaction(const JSONRPCRequest& request)
|
||||
" \"locktime\" : ttt, (numeric) The lock time\n"
|
||||
" \"vin\" : [ (array of json objects)\n"
|
||||
" {\n"
|
||||
" \"txid\": \"id\", (string) The transaction id\n"
|
||||
" \"vout\": n, (numeric) The output number\n"
|
||||
" \"scriptSig\": { (json object) The script\n"
|
||||
" \"asm\": \"asm\", (string) asm\n"
|
||||
" \"hex\": \"hex\" (string) hex\n"
|
||||
" \"txid\" : \"id\", (string) The transaction id\n"
|
||||
" \"vout\" : n, (numeric) The output number\n"
|
||||
" \"scriptSig\" : { (json object) The script\n"
|
||||
" \"asm\" : \"asm\", (string) asm\n"
|
||||
" \"hex\" : \"hex\" (string) hex\n"
|
||||
" },\n"
|
||||
" \"txinwitness\": [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n"
|
||||
" \"sequence\": n (numeric) The script sequence number\n"
|
||||
" \"txinwitness\" : [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n"
|
||||
" \"sequence\" : n (numeric) The script sequence number\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
@@ -514,20 +514,20 @@ static UniValue decodescript(const JSONRPCRequest& request)
|
||||
},
|
||||
RPCResult{
|
||||
"{\n"
|
||||
" \"asm\":\"asm\", (string) Script public key\n"
|
||||
" \"type\":\"type\", (string) The output type (e.g. "+GetAllOutputTypes()+")\n"
|
||||
" \"reqSigs\": n, (numeric) The required signatures\n"
|
||||
" \"addresses\": [ (json array of string)\n"
|
||||
" \"asm\" : \"asm\", (string) Script public key\n"
|
||||
" \"type\" : \"type\", (string) The output type (e.g. "+GetAllOutputTypes()+")\n"
|
||||
" \"reqSigs\" : n, (numeric) The required signatures\n"
|
||||
" \"addresses\" : [ (json array of string)\n"
|
||||
" \"address\" (string) bitcoin address\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
" \"p2sh\":\"str\" (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH).\n"
|
||||
" \"segwit\": { (json object) Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness).\n"
|
||||
" \"asm\":\"str\", (string) String representation of the script public key\n"
|
||||
" \"hex\":\"hexstr\", (string) Hex string of the script public key\n"
|
||||
" \"type\":\"str\", (string) The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)\n"
|
||||
" \"reqSigs\": n, (numeric) The required signatures (always 1)\n"
|
||||
" \"addresses\": [ (json array of string) (always length 1)\n"
|
||||
" \"segwit\" : { (json object) Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness).\n"
|
||||
" \"asm\" : \"str\", (string) String representation of the script public key\n"
|
||||
" \"hex\" : \"hexstr\", (string) Hex string of the script public key\n"
|
||||
" \"type\" : \"str\", (string) The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash)\n"
|
||||
" \"reqSigs\" : n, (numeric) The required signatures (always 1)\n"
|
||||
" \"addresses\" : [ (json array of string) (always length 1)\n"
|
||||
" \"address\" (string) segwit address\n"
|
||||
" ,...\n"
|
||||
" ],\n"
|
||||
@@ -846,7 +846,7 @@ static UniValue testmempoolaccept(const JSONRPCRequest& request)
|
||||
{"maxfeerate", RPCArg::Type::AMOUNT, /* default */ FormatMoney(DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK()), "Reject transactions whose fee rate is higher than the specified value, expressed in " + CURRENCY_UNIT + "/kB\n"},
|
||||
},
|
||||
RPCResult{
|
||||
"[ (array) The result of the mempool acceptance test for each raw transaction in the input array.\n"
|
||||
"[ (json array) The result of the mempool acceptance test for each raw transaction in the input array.\n"
|
||||
" Length is exactly one for now.\n"
|
||||
" {\n"
|
||||
" \"txid\" (string) The transaction hash in hex\n"
|
||||
@@ -998,7 +998,7 @@ UniValue decodepsbt(const JSONRPCRequest& request)
|
||||
" \"asm\" : \"asm\", (string) The asm\n"
|
||||
" \"hex\" : \"hex\", (string) The hex\n"
|
||||
" }\n"
|
||||
" \"final_scriptwitness\": [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n"
|
||||
" \"final_scriptwitness\" : [\"hex\", ...] (array of string) hex-encoded witness data (if any)\n"
|
||||
" \"unknown\" : { (json object) The unknown global fields\n"
|
||||
" \"key\" : \"value\" (key-value pair) An unknown key-value pair\n"
|
||||
" ...\n"
|
||||
|
||||
Reference in New Issue
Block a user