diff options
author | Antoine A <> | 2022-01-19 14:58:54 +0100 |
---|---|---|
committer | Antoine A <> | 2022-01-19 15:20:54 +0100 |
commit | b26af1f75a683f3a2d50aaf0de36b58a71ae7754 (patch) | |
tree | df8374a918744891a5e989cb27a53f0d59f7e29d /test/btc/reorg.sh | |
parent | 43ac6ffc4186d64b039c27649af1b14c28e0b3d1 (diff) | |
download | depolymerization-b26af1f75a683f3a2d50aaf0de36b58a71ae7754.tar.gz depolymerization-b26af1f75a683f3a2d50aaf0de36b58a71ae7754.tar.bz2 depolymerization-b26af1f75a683f3a2d50aaf0de36b58a71ae7754.zip |
Adapt defensively to blockchain forksresearch
Diffstat (limited to 'test/btc/reorg.sh')
-rw-r--r-- | test/btc/reorg.sh | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/test/btc/reorg.sh b/test/btc/reorg.sh index 3e4da8f..a0de12d 100644 --- a/test/btc/reorg.sh +++ b/test/btc/reorg.sh @@ -41,25 +41,14 @@ echo " OK" echo -n "Perform fork and check btc-wire hard error:" gateway_up -btc2_fork +btc2_fork 22 check_balance 9.99826299 0.00000000 gateway_down echo " OK" -echo -n "Check btc-wire hard error on restart:" -btc_wire -sleep 1 -gateway_down -echo " OK" - echo -n "Recover orphaned transactions:" -next_btc +next_btc 6 # More block needed to confirm check_balance 9.99826299 0.00165000 -echo " OK" - -echo -n "Check btc-wire heal on restart:" -btc_wire -sleep 1 gateway_up echo " OK" @@ -83,19 +72,20 @@ echo " OK" echo -n "Perform fork and check btc-wire still up:" gateway_up -btc2_fork +btc2_fork 22 check_balance 9.99826299 0.00146311 gateway_up echo " OK" echo -n "Recover orphaned transactions:" -next_btc +next_btc 6 # More block needed to confirm check_balance 9.99842799 0.00146311 echo " OK" echo "----- Handle reorg bounce -----" clear_wallet +check_balance "*" 0.00000000 echo "Loose second bitcoin node" btc2_deco @@ -105,20 +95,20 @@ for n in `$SEQ`; do $BTC_CLI -rpcwallet=client sendtoaddress $WIRE 0.000$n > /dev/null mine_btc done -next_btc +next_btc 6 # More block needed to confirm sleep 1 check_balance "*" 0.00011000 echo " OK" echo -n "Perform fork and check btc-wire hard error:" gateway_up -btc2_fork +btc2_fork 22 check_balance "*" 0.00000000 gateway_down echo " OK" echo -n "Recover orphaned transactions:" -next_btc +next_btc 6 # More block needed to confirm check_balance "*" 0.00011000 echo " OK" |