Overview
Comment: | Added example script to generate work using the "work_generate" RPC |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7cef158513048eee339b0b71c66cd193 |
User & Date: | rkeene on 2018-09-25 01:22:56 |
Other Links: | manifest | tags |
Context
2018-09-26
| ||
14:09 | Added defaults for the node peering and peers check-in: a5891c9a06 user: rkeene tags: trunk | |
2018-09-25
| ||
01:22 | Added example script to generate work using the "work_generate" RPC check-in: 7cef158513 user: rkeene tags: trunk | |
01:09 | Cleaned up extraneous auto_path check-in: dc7dc994d9 user: rkeene tags: trunk | |
Changes
Added examples/generate-work-rpc/generate-work-rpc version [727a1db77d].
> > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #! /usr/bin/env tclsh package require nano if {[llength $argv] < 2} { puts stderr "Usage: generate-work-rpc <rpcURL> <hash>..." exit 1 } set rpcURL [lindex $argv 0] set argv [lrange $argv 1 end] package require http 2 ::nano::rpc::client::init url $rpcURL foreach arg $argv { if {[catch { set work [::nano::rpc::client work_generate -hash $arg -use_peers true] set work [dict get $work work] } err]} { puts stderr "Error generating work for \"$arg\": $err" } else { puts "WORK($arg) = $work" } } |