mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Merge bitcoin/bitcoin#24579: doc: Fix getblockchaininfo/getdeploymentinfo RPC docs
facd5d92e1
doc: Fix getblockchaininfo/getdeploymentinfo RPC docs (MarcoFalke) Pull request description: Also, fix whitespace to be `4` spaces. Can be reviewed with `--ignore-all-space --word-diff-regex=.`. Found by https://github.com/bitcoin/bitcoin/pull/23083 ACKs for top commit: luke-jr: crACKfacd5d92e1
Tree-SHA512: 113228a6b140009cecd9068fb634d352148670589f647350e41c02a35e0ca306b4a2d3f2588cd9ef14a2ab7d1f23d0d2f83b5ebb00b60f17a1d16a8d71386fd2
This commit is contained in:
commit
138d55e6a0
1 changed files with 33 additions and 33 deletions
|
@ -1162,38 +1162,38 @@ RPCHelpMan getblockchaininfo()
|
||||||
{
|
{
|
||||||
/* TODO: from v24, remove -deprecatedrpc=softforks */
|
/* TODO: from v24, remove -deprecatedrpc=softforks */
|
||||||
return RPCHelpMan{"getblockchaininfo",
|
return RPCHelpMan{"getblockchaininfo",
|
||||||
"Returns an object containing various state info regarding blockchain processing.\n",
|
"Returns an object containing various state info regarding blockchain processing.\n",
|
||||||
{},
|
{},
|
||||||
RPCResult{
|
RPCResult{
|
||||||
RPCResult::Type::OBJ, "", "",
|
RPCResult::Type::OBJ, "", "",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest)"},
|
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest)"},
|
||||||
{RPCResult::Type::NUM, "blocks", "the height of the most-work fully-validated chain. The genesis block has height 0"},
|
{RPCResult::Type::NUM, "blocks", "the height of the most-work fully-validated chain. The genesis block has height 0"},
|
||||||
{RPCResult::Type::NUM, "headers", "the current number of headers we have validated"},
|
{RPCResult::Type::NUM, "headers", "the current number of headers we have validated"},
|
||||||
{RPCResult::Type::STR, "bestblockhash", "the hash of the currently best block"},
|
{RPCResult::Type::STR, "bestblockhash", "the hash of the currently best block"},
|
||||||
{RPCResult::Type::NUM, "difficulty", "the current difficulty"},
|
{RPCResult::Type::NUM, "difficulty", "the current difficulty"},
|
||||||
{RPCResult::Type::NUM_TIME, "time", "The block time expressed in " + UNIX_EPOCH_TIME},
|
{RPCResult::Type::NUM_TIME, "time", "The block time expressed in " + UNIX_EPOCH_TIME},
|
||||||
{RPCResult::Type::NUM_TIME, "mediantime", "The median block time expressed in " + UNIX_EPOCH_TIME},
|
{RPCResult::Type::NUM_TIME, "mediantime", "The median block time expressed in " + UNIX_EPOCH_TIME},
|
||||||
{RPCResult::Type::NUM, "verificationprogress", "estimate of verification progress [0..1]"},
|
{RPCResult::Type::NUM, "verificationprogress", "estimate of verification progress [0..1]"},
|
||||||
{RPCResult::Type::BOOL, "initialblockdownload", "(debug information) estimate of whether this node is in Initial Block Download mode"},
|
{RPCResult::Type::BOOL, "initialblockdownload", "(debug information) estimate of whether this node is in Initial Block Download mode"},
|
||||||
{RPCResult::Type::STR_HEX, "chainwork", "total amount of work in active chain, in hexadecimal"},
|
{RPCResult::Type::STR_HEX, "chainwork", "total amount of work in active chain, in hexadecimal"},
|
||||||
{RPCResult::Type::NUM, "size_on_disk", "the estimated size of the block and undo files on disk"},
|
{RPCResult::Type::NUM, "size_on_disk", "the estimated size of the block and undo files on disk"},
|
||||||
{RPCResult::Type::BOOL, "pruned", "if the blocks are subject to pruning"},
|
{RPCResult::Type::BOOL, "pruned", "if the blocks are subject to pruning"},
|
||||||
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "lowest-height complete block stored (only present if pruning is enabled)"},
|
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "lowest-height complete block stored (only present if pruning is enabled)"},
|
||||||
{RPCResult::Type::BOOL, "automatic_pruning", /*optional=*/true, "whether automatic pruning is enabled (only present if pruning is enabled)"},
|
{RPCResult::Type::BOOL, "automatic_pruning", /*optional=*/true, "whether automatic pruning is enabled (only present if pruning is enabled)"},
|
||||||
{RPCResult::Type::NUM, "prune_target_size", /*optional=*/true, "the target size used by pruning (only present if automatic pruning is enabled)"},
|
{RPCResult::Type::NUM, "prune_target_size", /*optional=*/true, "the target size used by pruning (only present if automatic pruning is enabled)"},
|
||||||
{RPCResult::Type::OBJ_DYN, "softforks", "(DEPRECATED, returned only if config option -deprecatedrpc=softforks is passed) status of softforks",
|
{RPCResult::Type::OBJ_DYN, "softforks", /*optional=*/true, "(DEPRECATED, returned only if config option -deprecatedrpc=softforks is passed) status of softforks",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::OBJ, "xxxx", "name of the softfork",
|
{RPCResult::Type::OBJ, "xxxx", "name of the softfork",
|
||||||
RPCHelpForDeployment
|
RPCHelpForDeployment
|
||||||
},
|
},
|
||||||
}},
|
}},
|
||||||
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
|
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
|
||||||
}},
|
}},
|
||||||
RPCExamples{
|
RPCExamples{
|
||||||
HelpExampleCli("getblockchaininfo", "")
|
HelpExampleCli("getblockchaininfo", "")
|
||||||
+ HelpExampleRpc("getblockchaininfo", "")
|
+ HelpExampleRpc("getblockchaininfo", "")
|
||||||
},
|
},
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
{
|
{
|
||||||
const ArgsManager& args{EnsureAnyArgsman(request.context)};
|
const ArgsManager& args{EnsureAnyArgsman(request.context)};
|
||||||
|
@ -1267,7 +1267,7 @@ const std::vector<RPCResult> RPCHelpForDeployment{
|
||||||
{RPCResult::Type::NUM, "count", "the number of blocks with the version bit set in the current period"},
|
{RPCResult::Type::NUM, "count", "the number of blocks with the version bit set in the current period"},
|
||||||
{RPCResult::Type::BOOL, "possible", /*optional=*/true, "returns false if there are not enough blocks left in this period to pass activation threshold (only for \"started\" status)"},
|
{RPCResult::Type::BOOL, "possible", /*optional=*/true, "returns false if there are not enough blocks left in this period to pass activation threshold (only for \"started\" status)"},
|
||||||
}},
|
}},
|
||||||
{RPCResult::Type::STR, "signalling", "indicates blocks that signalled with a # and blocks that did not with a -"},
|
{RPCResult::Type::STR, "signalling", /*optional=*/true, "indicates blocks that signalled with a # and blocks that did not with a -"},
|
||||||
}},
|
}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1296,7 +1296,7 @@ static RPCHelpMan getdeploymentinfo()
|
||||||
RPCResult::Type::OBJ, "", "", {
|
RPCResult::Type::OBJ, "", "", {
|
||||||
{RPCResult::Type::STR, "hash", "requested block hash (or tip)"},
|
{RPCResult::Type::STR, "hash", "requested block hash (or tip)"},
|
||||||
{RPCResult::Type::NUM, "height", "requested block height (or tip)"},
|
{RPCResult::Type::NUM, "height", "requested block height (or tip)"},
|
||||||
{RPCResult::Type::OBJ, "deployments", "", {
|
{RPCResult::Type::OBJ_DYN, "deployments", "", {
|
||||||
{RPCResult::Type::OBJ, "xxxx", "name of the deployment", RPCHelpForDeployment}
|
{RPCResult::Type::OBJ, "xxxx", "name of the deployment", RPCHelpForDeployment}
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue