Diff

Differences From Artifact [dad84c19fb]:

To Artifact [9ea0cf83ab]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env tclsh

package require nano

if {[llength $argv] == 0} {
	puts stderr "Usage: generate-work <hash>..."

	exit 1
}

foreach arg $argv {
	if {[catch {
		set work [::nano::work::fromBlockhash $arg]
	} err]} {
		puts stderr "Error generating work for \"$arg\": $err"
	} else {
		puts "WORK($arg) = $work"
	}
}












|






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env tclsh

package require nano

if {[llength $argv] == 0} {
	puts stderr "Usage: generate-work <hash>..."

	exit 1
}

foreach arg $argv {
	if {[catch {
		set work [::nano::work::fromBlockHash $arg]
	} err]} {
		puts stderr "Error generating work for \"$arg\": $err"
	} else {
		puts "WORK($arg) = $work"
	}
}