You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes (most?) of the rpc typechecking errors, at least the ones that are
tested by the functional tests.
However, I've left the rpc typechecking off after fixing these, since
I'm concerned that there are conditional cases that are untested in our
functional tests - and I'd rather not have RPC calls failing in a
release just because the documentation is not correct.
{RPCResult::Type::STR_HEX, "chainwork", /*optional=*/true, "Expected number of hashes required to produce the current chain"}, // Not for elements
620
620
{RPCResult::Type::NUM, "nTx", "The number of transactions in the block"},
621
621
{RPCResult::Type::STR, "signblock_challenge", /*optional=*/true, "The challenge for blocksigning (pre-dynafed)"},
622
-
{RPCResult::Type::STR, "signblock_witness_asm", "ASM of sign block witness data"},
623
-
{RPCResult::Type::STR_HEX, "signblock_witness_hex", "Hex of sign block witness data"},
622
+
{RPCResult::Type::STR, "signblock_witness_asm", /*optional=*/true, "ASM of sign block witness data"},
623
+
{RPCResult::Type::STR_HEX, "signblock_witness_hex", "Hex of sign block witness data", {}, /*skip_type_check=*/true},
624
624
{RPCResult::Type::OBJ, "dynamic_parameters", /*optional=*/true, "Dynamic federation parameters in the block, if any",
625
625
{
626
626
{RPCResult::Type::OBJ, "current", "enforced dynamic federation parameters. The signblockscript is published for each block, while others are published only at epoch start",
/* ELEMENTS: not present {RPCResult::Type::STR_HEX, "chainwork", "total amount of work in active chain, in hexadecimal"}, */
1381
1385
{RPCResult::Type::NUM, "size_on_disk", "the estimated size of the block and undo files on disk"},
1382
1386
{RPCResult::Type::BOOL, "pruned", "if the blocks are subject to pruning"},
1387
+
{RPCResult::Type::BOOL, "trim_headers", "if trim_headers is enabled"},
1383
1388
{RPCResult::Type::STR_HEX, "current_params_root", /*optional=*/true, "the root of the currently active dynafed params"}, // present if dynafed is active
1384
1389
{RPCResult::Type::STR, "signblock_asm", /*optional=*/true, "ASM of sign block challenge data from genesis block"}, // not present if dynafed is active
1385
1390
{RPCResult::Type::STR, "signblock_asm", /*optional=*/true, "ASM of sign block challenge data from genesis block"}, // not present if dynafed is active
{RPCResult::Type::NUM, "blocks", "The current block"},
431
431
{RPCResult::Type::NUM, "currentblockweight", /*optional=*/true, "The block weight of the last assembled block (only present if a block was ever assembled)"},
432
432
{RPCResult::Type::NUM, "currentblocktx", /*optional=*/true, "The number of block transactions of the last assembled block (only present if a block was ever assembled)"},
433
-
{RPCResult::Type::NUM, "difficulty", "The current difficulty"},
434
-
{RPCResult::Type::NUM, "networkhashps", "The network hashes per second"},
433
+
{RPCResult::Type::NUM, "difficulty", /*optional=*/true, "The current difficulty"},
434
+
{RPCResult::Type::NUM, "networkhashps", /*optional=*/true, "The network hashes per second"},
435
435
{RPCResult::Type::NUM, "pooledtx", "The size of the mempool"},
436
436
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest)"},
437
437
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
{RPCResult::Type::BOOL, "iswitness", /*optional=*/true, "If the address is a witness address"},
45
45
{RPCResult::Type::NUM, "witness_version", /*optional=*/true, "The version number of the witness program"},
46
46
{RPCResult::Type::STR_HEX, "witness_program", /*optional=*/true, "The hex value of the witness program"},
47
-
{RPCResult::Type::STR_HEX, "confidential_key", "the raw blinding public key for that address, if any. \"\" if none"},
48
-
{RPCResult::Type::STR, "unconfidential", "The address without confidentiality key"},
47
+
{RPCResult::Type::STR_HEX, "confidential_key", /*optional=*/true, "the raw blinding public key for that address, if any. \"\" if none"},
48
+
{RPCResult::Type::STR, "unconfidential", /*optional=*/true, "The address without confidentiality key"},
49
49
{RPCResult::Type::OBJ, "parent_address_info", /*optional=*/true, "If the address isvalid_parent, this object contains details about the parent address type",
50
50
{
51
51
{RPCResult::Type::STR, "address", ""},
52
-
{RPCResult::Type::STR_HEX, "scriptPubKey", ""},
52
+
{RPCResult::Type::STR_HEX, "scriptPubKey", "The hex-encoded scriptPubKey generated by the address"},
53
+
{RPCResult::Type::STR_HEX, "confidential_key", "The raw blinding public key for that address, if any. \"\" if none"},
54
+
{RPCResult::Type::STR_HEX, "unconfidential", "The address without confidentiality key"},
55
+
{RPCResult::Type::BOOL, "isscript", "If the key is a script"},
56
+
{RPCResult::Type::BOOL, "iswitness", "If the address is a witness address"},
57
+
{RPCResult::Type::NUM, "witness_version", /*optional=*/true, "The version number of the witness program"},
58
+
{RPCResult::Type::STR_HEX, "witness_program", /*optional=*/true, "The hex value of the witness program"},
53
59
}},
54
60
{RPCResult::Type::STR, "error", /*optional=*/true, "Error message, if any"},
55
61
{RPCResult::Type::STR, "error_parent", /* optional */true, "Error message, if any"},
0 commit comments