]> zoso.dev Git - nano-pow.git/commitdiff
Fix additional help documentation. Add small sample file of blockhashes used in test...
authorChris Duncan <chris@zoso.dev>
Thu, 13 Mar 2025 23:48:14 +0000 (16:48 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 13 Mar 2025 23:48:14 +0000 (16:48 -0700)
cli.js
nano-pow.1
test-seeds [new file with mode: 0644]

diff --git a/cli.js b/cli.js
index 3a89c54acc37852526c8237d82a4e14fa3b0429b..35219face0e6a90f002bc93f70f3ad68ba41b676 100755 (executable)
--- a/cli.js
+++ b/cli.js
@@ -9,21 +9,18 @@ const args = process.argv.slice(2)
 if (args.length === 0 || args.some(v => v === '--help' || v === '-h')) {
        console.log(`Usage: nano-pow [OPTION]... BLOCKHASH...
 Generate work for BLOCKHASH, or multiple work values for BLOCKHASH(es)
-BLOCKHASH is a 64-character hexadecimal string.
-Multiple blockhash values must be separated by spaces.
-Prints a 16-character hexadecimal work value to standard output.
-If using --validate, prints 'true' or 'false' to standard output instead.
-All command options are optional.
+BLOCKHASH is a 64-character hexadecimal string. Multiple blockhashes must be separated by whitespace or line breaks.
+Prints a 16-character hexadecimal work value to standard output. If using --validate, prints 'true' or 'false' to standard output instead.
 
   -h, --help                  show this dialog
   -d, --debug                 enable additional logging output
-  -e, --effort <value>        increase demand on GPU processing
-  -t, --threshold <value>     override the minimum threshold value
-  -v, --validate <value>      check an existing work value instead of searching for one
+  -e, --effort=<value>        increase demand on GPU processing
+  -t, --threshold=<value>     override the minimum threshold value
+  -v, --validate=<value>      check an existing work value instead of searching for one
 
 If validating a nonce, it must be a 16-character hexadecimal value.
-Effort must be a decimal number between 1 - 32.
-Threshold must be a hexadecimal number between 0x0 - 0xFFFFFFFF.
+Effort must be a decimal number between 1-32.
+Threshold must be a hexadecimal string between 0-FFFFFFFF.
 
 Report bugs: <bug-nano-pow@zoso.dev>
 Full documentation: <https://www.npmjs.com/package/nano-pow>
index f25f20eeaae1b807e2e6321163d361998590d430..a804f90f05dcbd4fc10cd98ff3333e9b7176ba69 100644 (file)
@@ -12,7 +12,7 @@ nano-pow \- proof-of-work generation and validation for Nano cryptocurrency
 .SH DESCRIPTION
 Generate work for \fIBLOCKHASH\fR, or multiple work values for \fIBLOCKHASH\fR(es).
 .PP
-\fIBLOCKHASH\fR is a 64-character hexadecimal string. Multiple blockhashes must be separated by spaces.
+\fIBLOCKHASH\fR is a 64-character hexadecimal string. Multiple blockhashes must be separated by whitespace or line breaks.
 .PP
 Prints a 16-character hexadecimal work value to standard output. If \fB--validate\fR is used, prints 'true' or 'false' to standard output.
 
@@ -24,13 +24,13 @@ Show this help dialog and exit.
 \fB\-d\fR, \fB\-\-debug\fR
 Enable additional logging output.
 .TP
-\fB\-e\fR, \fB\-\-effort\fR \fIEFFORT\fR
+\fB\-e\fR, \fB\-\-effort\fR=\fIEFFORT\fR
 Increase demand on GPU processing. Must be between 1 and 32 inclusive.
 .TP
-\fB\-t\fR, \fB\-\-threshold\fR \fITHRESHOLD\fR
-Override the minimum threshold value. Higher values increase difficulty. Must be in hexadecimal format between 0x0 and 0xFFFFFFFF.
+\fB\-t\fR, \fB\-\-threshold\fR=\fITHRESHOLD\fR
+Override the minimum threshold value. Higher values increase difficulty. Must be a hexadecimal string between 0 and FFFFFFFF inclusive.
 .TP
-\fB\-v\fR, \fB\-\-validate\fR \fIWORK\fR
+\fB\-v\fR, \fB\-\-validate\fR=\fIWORK\fR
 Check an existing work value instead of searching for one.
 
 .SH EXAMPLES
diff --git a/test-seeds b/test-seeds
new file mode 100644 (file)
index 0000000..eaee0bc
--- /dev/null
@@ -0,0 +1,8 @@
+92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D
+8797585D56B8AEA3A62899C31FC088F9BE849BA8298A88E94F6E3112D4E55D01
+204076E3364D16A018754FF67D418AB2FBEB38799FF9A29A1D5F9E34F16BEEEA
+281E89AC73B1082B464B9C3C1168384F846D39F6DF25105F8B4A22915E999117
+0000000000000000000000000000000000000000000000000000000000000000
+BA1E946BA3D778C2F30A83D44D2132CC6EEF010D8D06FF10A8ABD0100D8FB47E
+BF41D87DA3057FDC6050D2B00C06531F89F4AA6195D7C6C2EAAF15B6E703F8F6
+92BA74A7D6DC7557F3EDA95ADC6341D51AC777A0A6FF0688A5C492AB2B2CB40D