Add scripts to assist with controlling darksidewalletd
This commit is contained in:
parent
d258ee75b0
commit
ccb7211712
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
# Usage: ./pullblocks.sh 500000 500100 > blocks.txt
|
||||
|
||||
for i in $(seq $1 $2); do
|
||||
zcash-cli getblock $i 0
|
||||
done
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
# Submits a list of blocks, one per line in the file, to darksidewalletd.
|
||||
# Usage: ./submitblocks.sh <start height> <sapling activation> <file>
|
||||
# e.g. ./submitblocks.sh 1000 1000 blocks.txt
|
||||
set -e
|
||||
|
||||
JSON="{\"startHeight\": $1, \"saplingActivation\": $2, \"branchID\": \"2bb40e60\", \"chainName\": \"main\", \"blocks\": "
|
||||
JSON="$JSON$(cat "$3" | sed 's/^/"/' | sed 's/$/"/' | sed '1s/^/[/;$!s/$/,/;$s/$/]/')"
|
||||
JSON="$JSON}"
|
||||
|
||||
grpcurl -insecure -import-path ./walletrpc/ -proto service.proto -d "$JSON" localhost:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/DarksideSetState
|
Loading…
Reference in New Issue