forked from Qortal/qortal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
482 B
13 lines
482 B
#!/usr/bin/env bash |
|
|
|
# Requires: 'qort' script in PATH, and 'jq' utility installed |
|
|
|
set -e |
|
|
|
# Any extra args passed to us are also passed to 'qort', just prior to '-p peers' |
|
qort $@ -p peers | \ |
|
jq -r 'def lpad($len): |
|
tostring | ($len - length) as $l | (" " * $l)[:$l] + .; |
|
.[] | |
|
select(has("lastHeight")) | |
|
"\(.address | lpad(22)) (\(.version)), height \(.lastHeight), sig: \(.lastBlockSignature[0:8]), ts \(.lastBlockTimestamp / 1e3 | strftime("%Y-%m-%d %H:%M:%S"))"'
|
|
|