Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit 278da27

Browse files
authored
Merge pull request #87 from kadena-io/fix/network-too-help-message
network too help message
2 parents b9af03f + 3adb64e commit 278da27

File tree

2 files changed

+37
-14
lines changed

2 files changed

+37
-14
lines changed

devnet/state.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
#!/usr/bin/env bash
22

3+
function usage() {
4+
echo "Usage: $0 [NODE_NAME]"
5+
echo
6+
echo "Fetch and display the current consensus state of the specified Chainweb node."
7+
echo
8+
echo "Options:"
9+
echo " NODE_NAME The name of the Chainweb node to query (default: bootnode-consensus)"
10+
echo " -h, --help, -? Show this help message and exit"
11+
}
12+
13+
for arg in "$@"; do
14+
case "$arg" in
15+
--help|-h|-?)
16+
usage
17+
exit 0
18+
;;
19+
*)
20+
;;
21+
esac
22+
done
23+
324
export NODE=${1:-bootnode-consensus}
425

526
function get_summary_json() {
@@ -24,7 +45,7 @@ function get_summary() {
2445
{ chain: .key|tonumber
2546
, height: .value.height
2647
, hash: .value.hash
27-
, type: (if ((.key|tonumber) > 19 and (.key|tonumber) < 40) then "evm" else "default" end)
48+
, type: (if ((.key|tonumber) > 19 and (.key|tonumber) < 25) then "evm" else "default" end)
2849
}
2950
| with_entries (.key |= ascii_downcase)
3051
]

network

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,21 @@ function blockscout-help () {
103103

104104
function devnet-help () {
105105
echo -e "${YELLOW}Devnet commands:${R}"
106-
echo -e " ${B}devnet pull${R} pull container images for all devnet services"
107-
echo -e " ${B}devnet start|up${R} start the network with default components"
108-
echo -e " ${B}devnet stop|down${R} shutdown the network and reset all database"
109-
echo -e " ${B}devnet allocations${R} print information about pre-allocated wallets"
110-
echo -e " ${B}devnet state|status${R} --node print lastest consensus state for all chains in the network"
111-
echo -e " ${B}devnet summary${R} print summary of the consensus state for all nodes in the network"
112-
echo -e " ${B}devnet restart${R} restart the chainweb-node service"
113-
echo -e " ${B}devnet ports${R} show ports of available services"
114-
echo -e " ${B}devnet height-details${R} return detailed information for a given block height or 'latest' in JSON"
115-
echo -e " ${B}devnet services${R} show status of services in the network (docker compose ps)"
116-
echo -e " ${B}devnet chain-config${R} show chainweb chain configuration"
117-
echo -e " ${B}devnet curl${R} run a curl command from within the docker network"
118-
echo -e " ${B}devnet reth-db${R} run a reth CLI database debugging command (first argument is the chain, i.e. 0 or 1)"
106+
echo -e " ${B}devnet pull${R} pull container images for all devnet services"
107+
echo -e " ${B}devnet start|up${R} start the network with default components"
108+
echo -e " ${B}devnet stop|down${R} shutdown the network and reset all database"
109+
echo -e " ${B}devnet allocations${R} print information about pre-allocated wallets"
110+
echo -e " ${B}devnet state|status${R} print lastest consensus state for all chains in the network"
111+
echo -e " ${B}devnet summary${R} print summary of the consensus state for all nodes in the network"
112+
echo -e " ${B}devnet restart${R} restart the chainweb-node service"
113+
echo -e " ${B}devnet ports${R} show ports of available services"
114+
echo -e " ${B}devnet height-details${R} return detailed information for a given block height or 'latest' in JSON"
115+
echo -e " ${B}devnet services${R} show status of services in the network (docker compose ps)"
116+
echo -e " ${B}devnet chain-config${R} show chainweb chain configuration"
117+
echo -e " ${B}devnet curl${R} run a curl command from within the docker network"
118+
echo -e " ${B}devnet reth-db${R} run a reth CLI database debugging command (first argument is the chain, i.e. 0 or 1)"
119+
echo -e ""
120+
echo -e " Use a command with ${B}--help${R}, ${B}-h${R}, or ${B}-?${R} to see more details and options."
119121
}
120122

121123
function usage() {

0 commit comments

Comments
 (0)