Last active
June 23, 2020 21:18
-
-
Save LarryRuane/42b181618757c6aacba6f41d53fdbca7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# reproduce https://github.com/zcash/zcash/issues/4301 | |
test ! -f zcashd && { echo ./zcashd not found;exit 1;} | |
rm -rf dd | |
mkdir dd | |
(echo regtest=1 ; testnet=1 ; echo rpcuser=u ; echo rpcpassword=p) > dd/zcash.conf | |
./zcashd -datadir=dd -nuparams=5ba81b19:1 -nuparams=76b809bb:2 -nuparams=2bb40e60:3 -nuparams=f5b9230b:4 & | |
sleep 8 | |
./zcash-cli -datadir=dd generate 4 | |
./zcash-cli -datadir=dd z_getnewaddress sapling >testzaddr | |
./zcash-cli -datadir=dd stop | |
wait | |
./zcashd -datadir=dd -nuparams=5ba81b19:1 -nuparams=76b809bb:2 -nuparams=2bb40e60:3 -nuparams=f5b9230b:4 -mineraddress=$(cat testzaddr) & | |
sleep 8 | |
./zcash-cli -datadir=dd generate 1 | |
./zcash-cli -datadir=dd stop | |
wait | |
./zcashd -datadir=dd -nuparams=5ba81b19:1 -nuparams=76b809bb:2 -nuparams=2bb40e60:3 -nuparams=f5b9230b:4 -mineraddress=$(cat testzaddr) & | |
sleep 3620 # one hour(+), so that the next generate causes SetBestChain() to run | |
./zcash-cli -datadir=dd generate 1 | |
./zcash-cli -datadir=dd stop | |
wait | |
./zcashd -datadir=dd -nuparams=5ba81b19:1 -nuparams=76b809bb:2 -nuparams=2bb40e60:3 -nuparams=f5b9230b:4 -mineraddress=$(cat testzaddr) & | |
sleep 8 | |
./zcash-cli -datadir=dd generate 1 # this should cause zcashd to assert | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just had to update
sleep 4
tosleep 8
because startup can take longer than 4 seconds.