@@ -54,38 +54,34 @@ static bool AppInitRawTx(int argc, char* argv[])
54
54
55
55
fprintf (stdout, " %s" , strUsage.c_str ());
56
56
57
- strUsage = _ (" Options:" ) + " \n " ;
58
- strUsage += " -? " + _ (" This help message" ) + " \n " ;
59
- strUsage += " -create " + _ (" Create new, empty TX." ) + " \n " ;
60
- strUsage += " -json " + _ (" Select JSON output" ) + " \n " ;
61
- strUsage += " -txid " + _ (" Output only the hex-encoded transaction id of the resultant transaction." ) + " \n " ;
62
- strUsage += " -regtest " + _ (" Enter regression test mode, which uses a special chain in which blocks can be solved instantly." ) + " \n " ;
63
- strUsage += " -testnet " + _ (" Use the test network" ) + " \n " ;
64
- strUsage += " \n " ;
57
+ strUsage = HelpMessageGroup (_ (" Options:" ));
58
+ strUsage += HelpMessageOpt (" -?" , _ (" This help message" ));
59
+ strUsage += HelpMessageOpt (" -create" , _ (" Create new, empty TX." ));
60
+ strUsage += HelpMessageOpt (" -json" , _ (" Select JSON output" ));
61
+ strUsage += HelpMessageOpt (" -txid" , _ (" Output only the hex-encoded transaction id of the resultant transaction." ));
62
+ strUsage += HelpMessageOpt (" -regtest" , _ (" Enter regression test mode, which uses a special chain in which blocks can be solved instantly." ));
63
+ strUsage += HelpMessageOpt (" -testnet" , _ (" Use the test network" ));
65
64
66
65
fprintf (stdout, " %s" , strUsage.c_str ());
67
66
68
-
69
- strUsage = _ (" Commands:" ) + " \n " ;
70
- strUsage += " delin=N " + _ (" Delete input N from TX" ) + " \n " ;
71
- strUsage += " delout=N " + _ (" Delete output N from TX" ) + " \n " ;
72
- strUsage += " in=TXID:VOUT " + _ (" Add input to TX" ) + " \n " ;
73
- strUsage += " locktime=N " + _ (" Set TX lock time to N" ) + " \n " ;
74
- strUsage += " nversion=N " + _ (" Set TX version to N" ) + " \n " ;
75
- strUsage += " outaddr=VALUE:ADDRESS " + _ (" Add address-based output to TX" ) + " \n " ;
76
- strUsage += " outscript=VALUE:SCRIPT " + _ (" Add raw script output to TX" ) + " \n " ;
77
- strUsage += " sign=SIGHASH-FLAGS " + _ (" Add zero or more signatures to transaction" ) + " \n " ;
78
- strUsage += " This command requires JSON registers:\n " ;
79
- strUsage += " prevtxs=JSON object\n " ;
80
- strUsage += " privatekeys=JSON object\n " ;
81
- strUsage += " See signrawtransaction docs for format of sighash flags, JSON objects.\n " ;
82
- strUsage += " \n " ;
67
+ strUsage = HelpMessageGroup (_ (" Commands:" ));
68
+ strUsage += HelpMessageOpt (" delin=N" , _ (" Delete input N from TX" ));
69
+ strUsage += HelpMessageOpt (" delout=N" , _ (" Delete output N from TX" ));
70
+ strUsage += HelpMessageOpt (" in=TXID:VOUT" , _ (" Add input to TX" ));
71
+ strUsage += HelpMessageOpt (" locktime=N" , _ (" Set TX lock time to N" ));
72
+ strUsage += HelpMessageOpt (" nversion=N" , _ (" Set TX version to N" ));
73
+ strUsage += HelpMessageOpt (" outaddr=VALUE:ADDRESS" , _ (" Add address-based output to TX" ));
74
+ strUsage += HelpMessageOpt (" outscript=VALUE:SCRIPT" , _ (" Add raw script output to TX" ));
75
+ strUsage += HelpMessageOpt (" sign=SIGHASH-FLAGS" , _ (" Add zero or more signatures to transaction" ) + " . " +
76
+ _ (" This command requires JSON registers:" ) +
77
+ _ (" prevtxs=JSON object" ) + " , " +
78
+ _ (" privatekeys=JSON object" ) + " . " +
79
+ _ (" See signrawtransaction docs for format of sighash flags, JSON objects." ));
83
80
fprintf (stdout, " %s" , strUsage.c_str ());
84
81
85
- strUsage = _ (" Register Commands:" ) + " \n " ;
86
- strUsage += " load=NAME:FILENAME " + _ (" Load JSON file FILENAME into register NAME" ) + " \n " ;
87
- strUsage += " set=NAME:JSON-STRING " + _ (" Set register NAME to given JSON-STRING" ) + " \n " ;
88
- strUsage += " \n " ;
82
+ strUsage = HelpMessageGroup (_ (" Register Commands:" ));
83
+ strUsage += HelpMessageOpt (" load=NAME:FILENAME" , _ (" Load JSON file FILENAME into register NAME" ));
84
+ strUsage += HelpMessageOpt (" set=NAME:JSON-STRING" , _ (" Set register NAME to given JSON-STRING" ));
89
85
fprintf (stdout, " %s" , strUsage.c_str ());
90
86
91
87
return false ;
0 commit comments