Artifact 5e6bfb3da3ab4bb78f583d281d09503b67eef2d00220856456e702f01ced53f3:
- Executable file examples/generate-work/generate-work — part of check-in [4a127ff396] at 2018-07-03 19:29:36 on branch trunk — Added an example for generating work from a given hash (user: rkeene, size: 416) [annotate] [blame] [check-ins using]
#! /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::internal::generateWork [binary decode hex $arg]] set work [binary encode hex $work] set work [string toupper $work] } err]} { puts stderr "Error generating work for \"$arg\": $err" } else { puts "WORK($arg) = $work" } }