Skip to content

Commit 138d55e

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24579: doc: Fix getblockchaininfo/getdeploymentinfo RPC docs
facd5d9 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 bitcoin/bitcoin#23083 ACKs for top commit: luke-jr: crACK facd5d9 Tree-SHA512: 113228a6b140009cecd9068fb634d352148670589f647350e41c02a35e0ca306b4a2d3f2588cd9ef14a2ab7d1f23d0d2f83b5ebb00b60f17a1d16a8d71386fd2
2 parents b8f498f + facd5d9 commit 138d55e

File tree

1 file changed

+33
-33
lines changed

1 file changed

+33
-33
lines changed

src/rpc/blockchain.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,38 +1162,38 @@ RPCHelpMan getblockchaininfo()
11621162
{
11631163
/* TODO: from v24, remove -deprecatedrpc=softforks */
11641164
return RPCHelpMan{"getblockchaininfo",
1165-
"Returns an object containing various state info regarding blockchain processing.\n",
1166-
{},
1167-
RPCResult{
1168-
RPCResult::Type::OBJ, "", "",
1169-
{
1170-
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest)"},
1171-
{RPCResult::Type::NUM, "blocks", "the height of the most-work fully-validated chain. The genesis block has height 0"},
1172-
{RPCResult::Type::NUM, "headers", "the current number of headers we have validated"},
1173-
{RPCResult::Type::STR, "bestblockhash", "the hash of the currently best block"},
1174-
{RPCResult::Type::NUM, "difficulty", "the current difficulty"},
1175-
{RPCResult::Type::NUM_TIME, "time", "The block time expressed in " + UNIX_EPOCH_TIME},
1176-
{RPCResult::Type::NUM_TIME, "mediantime", "The median block time expressed in " + UNIX_EPOCH_TIME},
1177-
{RPCResult::Type::NUM, "verificationprogress", "estimate of verification progress [0..1]"},
1178-
{RPCResult::Type::BOOL, "initialblockdownload", "(debug information) estimate of whether this node is in Initial Block Download mode"},
1179-
{RPCResult::Type::STR_HEX, "chainwork", "total amount of work in active chain, in hexadecimal"},
1180-
{RPCResult::Type::NUM, "size_on_disk", "the estimated size of the block and undo files on disk"},
1181-
{RPCResult::Type::BOOL, "pruned", "if the blocks are subject to pruning"},
1182-
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "lowest-height complete block stored (only present if pruning is enabled)"},
1183-
{RPCResult::Type::BOOL, "automatic_pruning", /*optional=*/true, "whether automatic pruning is enabled (only present if pruning is enabled)"},
1184-
{RPCResult::Type::NUM, "prune_target_size", /*optional=*/true, "the target size used by pruning (only present if automatic pruning is enabled)"},
1185-
{RPCResult::Type::OBJ_DYN, "softforks", "(DEPRECATED, returned only if config option -deprecatedrpc=softforks is passed) status of softforks",
1186-
{
1187-
{RPCResult::Type::OBJ, "xxxx", "name of the softfork",
1188-
RPCHelpForDeployment
1189-
},
1190-
}},
1191-
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
1192-
}},
1193-
RPCExamples{
1194-
HelpExampleCli("getblockchaininfo", "")
1165+
"Returns an object containing various state info regarding blockchain processing.\n",
1166+
{},
1167+
RPCResult{
1168+
RPCResult::Type::OBJ, "", "",
1169+
{
1170+
{RPCResult::Type::STR, "chain", "current network name (main, test, signet, regtest)"},
1171+
{RPCResult::Type::NUM, "blocks", "the height of the most-work fully-validated chain. The genesis block has height 0"},
1172+
{RPCResult::Type::NUM, "headers", "the current number of headers we have validated"},
1173+
{RPCResult::Type::STR, "bestblockhash", "the hash of the currently best block"},
1174+
{RPCResult::Type::NUM, "difficulty", "the current difficulty"},
1175+
{RPCResult::Type::NUM_TIME, "time", "The block time expressed in " + UNIX_EPOCH_TIME},
1176+
{RPCResult::Type::NUM_TIME, "mediantime", "The median block time expressed in " + UNIX_EPOCH_TIME},
1177+
{RPCResult::Type::NUM, "verificationprogress", "estimate of verification progress [0..1]"},
1178+
{RPCResult::Type::BOOL, "initialblockdownload", "(debug information) estimate of whether this node is in Initial Block Download mode"},
1179+
{RPCResult::Type::STR_HEX, "chainwork", "total amount of work in active chain, in hexadecimal"},
1180+
{RPCResult::Type::NUM, "size_on_disk", "the estimated size of the block and undo files on disk"},
1181+
{RPCResult::Type::BOOL, "pruned", "if the blocks are subject to pruning"},
1182+
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "lowest-height complete block stored (only present if pruning is enabled)"},
1183+
{RPCResult::Type::BOOL, "automatic_pruning", /*optional=*/true, "whether automatic pruning is enabled (only present if pruning is enabled)"},
1184+
{RPCResult::Type::NUM, "prune_target_size", /*optional=*/true, "the target size used by pruning (only present if automatic pruning is enabled)"},
1185+
{RPCResult::Type::OBJ_DYN, "softforks", /*optional=*/true, "(DEPRECATED, returned only if config option -deprecatedrpc=softforks is passed) status of softforks",
1186+
{
1187+
{RPCResult::Type::OBJ, "xxxx", "name of the softfork",
1188+
RPCHelpForDeployment
1189+
},
1190+
}},
1191+
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
1192+
}},
1193+
RPCExamples{
1194+
HelpExampleCli("getblockchaininfo", "")
11951195
+ HelpExampleRpc("getblockchaininfo", "")
1196-
},
1196+
},
11971197
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
11981198
{
11991199
const ArgsManager& args{EnsureAnyArgsman(request.context)};
@@ -1267,7 +1267,7 @@ const std::vector<RPCResult> RPCHelpForDeployment{
12671267
{RPCResult::Type::NUM, "count", "the number of blocks with the version bit set in the current period"},
12681268
{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)"},
12691269
}},
1270-
{RPCResult::Type::STR, "signalling", "indicates blocks that signalled with a # and blocks that did not with a -"},
1270+
{RPCResult::Type::STR, "signalling", /*optional=*/true, "indicates blocks that signalled with a # and blocks that did not with a -"},
12711271
}},
12721272
};
12731273

@@ -1296,7 +1296,7 @@ static RPCHelpMan getdeploymentinfo()
12961296
RPCResult::Type::OBJ, "", "", {
12971297
{RPCResult::Type::STR, "hash", "requested block hash (or tip)"},
12981298
{RPCResult::Type::NUM, "height", "requested block height (or tip)"},
1299-
{RPCResult::Type::OBJ, "deployments", "", {
1299+
{RPCResult::Type::OBJ_DYN, "deployments", "", {
13001300
{RPCResult::Type::OBJ, "xxxx", "name of the deployment", RPCHelpForDeployment}
13011301
}},
13021302
}

0 commit comments

Comments
 (0)