fix p2p test in circleci
This commit is contained in:
parent
f3d755f5e8
commit
80ab7bfe99
|
@ -315,12 +315,6 @@
|
|||
revision = "2106ca61d91029c931fd54968c2bb02dc96b1412"
|
||||
version = "0.10.1"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/tendermint/go-crypto"
|
||||
packages = ["tmhash"]
|
||||
revision = "6a6b591a3d7592a04b46af95451cb5be3b114f76"
|
||||
version = "v0.9.0"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/tendermint/tmlibs"
|
||||
packages = [
|
||||
|
|
|
@ -26,11 +26,11 @@ for i in $(seq 1 "$N"); do
|
|||
echo ""
|
||||
|
||||
# we need to wait another block to get the new app_hash
|
||||
h1=$(curl -s "$addr/status" | jq .result.sync_info.latest_block_height)
|
||||
h1=$(curl -s "$addr/status" | jq .result.sync_info.latest_block_height | jq fromjson)
|
||||
h2=$h1
|
||||
while [ "$h2" == "$h1" ]; do
|
||||
sleep 1
|
||||
h2=$(curl -s "$addr/status" | jq .result.sync_info.latest_block_height)
|
||||
h2=$(curl -s "$addr/status" | jq .result.sync_info.latest_block_height | jq fromjson)
|
||||
done
|
||||
|
||||
# wait for all other peers to get to this height
|
||||
|
@ -39,10 +39,10 @@ for i in $(seq 1 "$N"); do
|
|||
if [[ "$i" != "$j" ]]; then
|
||||
addrJ=$(test/p2p/ip.sh "$j"):26657
|
||||
|
||||
h=$(curl -s "$addrJ/status" | jq .result.sync_info.latest_block_height)
|
||||
h=$(curl -s "$addrJ/status" | jq .result.sync_info.latest_block_height | jq fromjson)
|
||||
while [ "$h" -lt "$minHeight" ]; do
|
||||
sleep 1
|
||||
h=$(curl -s "$addrJ/status" | jq .result.sync_info.latest_block_height)
|
||||
h=$(curl -s "$addrJ/status" | jq .result.sync_info.latest_block_height | jq fromjson)
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -54,12 +54,12 @@ for i in `seq 1 $N`; do
|
|||
done
|
||||
|
||||
# - assert block height is greater than 1
|
||||
BLOCK_HEIGHT=`curl -s $addr/status | jq .result.sync_info.latest_block_height`
|
||||
BLOCK_HEIGHT=`curl -s $addr/status | jq .result.sync_info.latest_block_height | jq fromjson`
|
||||
COUNT=0
|
||||
while [ "$BLOCK_HEIGHT" -le 1 ]; do
|
||||
echo "Waiting for node $i to commit a block ..."
|
||||
sleep 1
|
||||
BLOCK_HEIGHT=`curl -s $addr/status | jq .result.sync_info.latest_block_height`
|
||||
BLOCK_HEIGHT=`curl -s $addr/status | jq .result.sync_info.latest_block_height | jq fromjson`
|
||||
COUNT=$((COUNT+1))
|
||||
if [ "$COUNT" -gt "$MAX_SLEEP" ]; then
|
||||
echo "Waited too long for node $i to commit a block"
|
||||
|
|
|
@ -4,34 +4,34 @@
|
|||
"validators": [
|
||||
{
|
||||
"pub_key": {
|
||||
"type": "AC26791624DE60",
|
||||
"type": "tendermint/PubKeyEd25519",
|
||||
"value": "vokz3/FgDAJuNHGPF4Wkzeq5DDVpizlOOLaUeukd4RY="
|
||||
},
|
||||
"power": 1,
|
||||
"power": "1",
|
||||
"name": "mach1"
|
||||
},
|
||||
{
|
||||
"pub_key": {
|
||||
"type": "AC26791624DE60",
|
||||
"type": "tendermint/PubKeyEd25519",
|
||||
"value": "bcU0RlMjEmWH0qKpO1nWibcXBzsd6WiiWm7xPVlTGK0="
|
||||
},
|
||||
"power": 1,
|
||||
"power": "1",
|
||||
"name": "mach2"
|
||||
},
|
||||
{
|
||||
"pub_key": {
|
||||
"type": "AC26791624DE60",
|
||||
"type": "tendermint/PubKeyEd25519",
|
||||
"value": "rmesaX0TWqC0YB6lfqqz/r9Lqk8inEWlmMKYWxL80aE="
|
||||
},
|
||||
"power": 1,
|
||||
"power": "1",
|
||||
"name": "mach3"
|
||||
},
|
||||
{
|
||||
"pub_key": {
|
||||
"type": "AC26791624DE60",
|
||||
"type": "tendermint/PubKeyEd25519",
|
||||
"value": "nryPWM7UtG3NWrirpZHdJTzXy1A3Jz/aMrwLZGHE79k="
|
||||
},
|
||||
"power": 1,
|
||||
"power": "1",
|
||||
"name": "mach4"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"address": "7E9D1FB08EDBAFCF116638D4C8FAFAEE2ABE1AAA",
|
||||
"address": "AE47BBD4B3ACD80BFE17F6E0C66C5B8492A81AE4",
|
||||
"pub_key": {
|
||||
"type": "tendermint/PubKeyEd25519",
|
||||
"value": "vokz3/FgDAJuNHGPF4Wkzeq5DDVpizlOOLaUeukd4RY="
|
||||
},
|
||||
"last_height": 0,
|
||||
"last_round": 0,
|
||||
"last_height": "0",
|
||||
"last_round": "0",
|
||||
"last_step": 0,
|
||||
"priv_key": {
|
||||
"type": "tendermint/PrivKeyEd25519",
|
||||
|
|
|
@ -15,7 +15,7 @@ peerID=$(( $(($ID % 4)) + 1 )) # 1->2 ... 3->4 ... 4->1
|
|||
peer_addr=$(test/p2p/ip.sh $peerID):26657
|
||||
|
||||
# get another peer's height
|
||||
h1=`curl -s $peer_addr/status | jq .result.sync_info.latest_block_height`
|
||||
h1=`curl -s $peer_addr/status | jq .result.sync_info.latest_block_height | jq fromjson`
|
||||
|
||||
# get another peer's state
|
||||
root1=`curl -s $peer_addr/status | jq .result.sync_info.latest_app_hash`
|
||||
|
@ -29,7 +29,7 @@ set +o pipefail
|
|||
h2="0"
|
||||
while [[ "$h2" -lt "$(($h1+3))" ]]; do
|
||||
sleep 1
|
||||
h2=`curl -s $addr/status | jq .result.sync_info.latest_block_height`
|
||||
h2=`curl -s $addr/status | jq .result.sync_info.latest_block_height | jq fromjson`
|
||||
echo "... $h2"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue