File tree Expand file tree Collapse file tree
framework/src/main/java/org/tron/core/config/args Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1698,6 +1698,9 @@ public static void printHelp(JCommander jCommander) {
16981698 jCommander .getProgramName ();
16991699 helpStr .append (String .format ("%nUsage: java -jar %s [options] [seedNode <seedNode> ...]%n" ,
17001700 programName ));
1701+ helpStr .append (String .format (
1702+ "%nNote: Positional seedNode arguments are deprecated."
1703+ + " Use seed.node.ip.list in the config file instead.%n" ));
17011704 helpStr .append (String .format ("%nVERSION: %n%s-%s%n" , Version .getVersion (),
17021705 getCommitIdAbbrev ()));
17031706
@@ -1719,9 +1722,21 @@ public static void printHelp(JCommander jCommander) {
17191722 logger .warn ("Miss option:{}" , option );
17201723 continue ;
17211724 }
1725+ boolean isDeprecated ;
1726+ try {
1727+ isDeprecated = CLIParameter .class .getDeclaredField (
1728+ parameterDescription .getParameterized ().getName ())
1729+ .isAnnotationPresent (Deprecated .class );
1730+ } catch (NoSuchFieldException e ) {
1731+ isDeprecated = false ;
1732+ }
1733+ String desc = upperFirst (parameterDescription .getDescription ());
1734+ if (isDeprecated ) {
1735+ desc += " (deprecated)" ;
1736+ }
17221737 String tmpOptionDesc = String .format ("%s\t \t \t %s%n" ,
17231738 Strings .padEnd (parameterDescription .getNames (), optionMaxLength , ' ' ),
1724- upperFirst ( parameterDescription . getDescription ()) );
1739+ desc );
17251740 helpStr .append (tmpOptionDesc );
17261741 }
17271742 }
You can’t perform that action at this time.
0 commit comments