Artifact [9ea0cf83ab]

Artifact 9ea0cf83ab8332692ad9aab9fd555673667fb48ab72122aa22372458e2ca9eb1:


#! /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"
	}
}