Skip to content

Commit 7d3343f

Browse files
committed
cli: update -netinfo help doc following the merge of 882ce25
1 parent ef614bb commit 7d3343f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/bitcoin-cli.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,20 +512,20 @@ class NetinfoRequestHandler : public BaseRequestHandler
512512
"Returns a network peer connections dashboard with information from the remote server.\n"
513513
"This human-readable interface will change regularly and is not intended to be a stable API.\n"
514514
"Under the hood, -netinfo fetches the data by calling getpeerinfo and getnetworkinfo.\n"
515-
"An optional integer argument from 0 to 4 can be passed for different peers listings.\n"
515+
+ strprintf("An optional integer argument from 0 to %d can be passed for different peers listings; %d to 255 are parsed as %d.\n", MAX_DETAIL_LEVEL, MAX_DETAIL_LEVEL, MAX_DETAIL_LEVEL) +
516516
"Pass \"help\" to see this detailed help documentation.\n"
517517
"If more than one argument is passed, only the first one is read and parsed.\n"
518518
"Suggestion: use with the Linux watch(1) command for a live dashboard; see example below.\n\n"
519519
"Arguments:\n"
520-
"1. level (integer 0-4, optional) Specify the info level of the peers dashboard (default 0):\n"
520+
+ strprintf("1. level (integer 0-%d, optional) Specify the info level of the peers dashboard (default 0):\n", MAX_DETAIL_LEVEL) +
521521
" 0 - Connection counts and local addresses\n"
522522
" 1 - Like 0 but with a peers listing (without address or version columns)\n"
523523
" 2 - Like 1 but with an address column\n"
524524
" 3 - Like 1 but with a version column\n"
525525
" 4 - Like 1 but with both address and version columns\n"
526526
"2. help (string \"help\", optional) Print this help documentation instead of the dashboard.\n\n"
527527
"Result:\n\n"
528-
"* The peers listing in levels 1-4 displays all of the peers sorted by direction and minimum ping time:\n\n"
528+
+ strprintf("* The peers listing in levels 1-%d displays all of the peers sorted by direction and minimum ping time:\n\n", MAX_DETAIL_LEVEL) +
529529
" Column Description\n"
530530
" ------ -----------\n"
531531
" <-> Direction\n"
@@ -562,9 +562,9 @@ class NetinfoRequestHandler : public BaseRequestHandler
562562
"Compact peers listing\n"
563563
"> bitcoin-cli -netinfo 1\n\n"
564564
"Full dashboard\n"
565-
"> bitcoin-cli -netinfo 4\n\n"
565+
+ strprintf("> bitcoin-cli -netinfo %d\n\n", MAX_DETAIL_LEVEL) +
566566
"Full live dashboard, adjust --interval or --no-title as needed (Linux)\n"
567-
"> watch --interval 1 --no-title bitcoin-cli -netinfo 4\n\n"
567+
+ strprintf("> watch --interval 1 --no-title bitcoin-cli -netinfo %d\n\n", MAX_DETAIL_LEVEL) +
568568
"See this help\n"
569569
"> bitcoin-cli -netinfo help\n"};
570570
};

0 commit comments

Comments
 (0)