Fixed demo test script
This commit is contained in:
parent
d0be11682b
commit
1d6f11aba7
|
@ -6,10 +6,10 @@
|
|||
{
|
||||
"amount": 10,
|
||||
"name": "",
|
||||
"pub_key": [
|
||||
1,
|
||||
"D6EBB92440CF375054AA59BCF0C99D596DEEDFFB2543CAE1BA1908B72CF9676A"
|
||||
]
|
||||
"pub_key": {
|
||||
"type": "ed25519",
|
||||
"data":"D6EBB92440CF375054AA59BCF0C99D596DEEDFFB2543CAE1BA1908B72CF9676A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"app_options": {
|
||||
|
|
|
@ -1,16 +1 @@
|
|||
{
|
||||
"address": "EBB0B4A899973C524A6BB18A161056A55F590F41",
|
||||
"last_height": 0,
|
||||
"last_round": 0,
|
||||
"last_signature": null,
|
||||
"last_signbytes": "",
|
||||
"last_step": 0,
|
||||
"priv_key": [
|
||||
1,
|
||||
"5FFDC1EA5FA2CA4A0A5503C86D2D348C5B401AD80FAA1899508F1ED00D8982E8D6EBB92440CF375054AA59BCF0C99D596DEEDFFB2543CAE1BA1908B72CF9676A"
|
||||
],
|
||||
"pub_key": [
|
||||
1,
|
||||
"D6EBB92440CF375054AA59BCF0C99D596DEEDFFB2543CAE1BA1908B72CF9676A"
|
||||
]
|
||||
}
|
||||
{"address":"EBB0B4A899973C524A6BB18A161056A55F590F41","pub_key":{"type":"ed25519","data":"D6EBB92440CF375054AA59BCF0C99D596DEEDFFB2543CAE1BA1908B72CF9676A"},"last_height":0,"last_round":0,"last_step":0,"last_signature":null,"priv_key":{"type":"ed25519","data":"5FFDC1EA5FA2CA4A0A5503C86D2D348C5B401AD80FAA1899508F1ED00D8982E8D6EBB92440CF375054AA59BCF0C99D596DEEDFFB2543CAE1BA1908B72CF9676A"}}
|
|
@ -6,10 +6,10 @@
|
|||
{
|
||||
"amount": 10,
|
||||
"name": "",
|
||||
"pub_key": [
|
||||
1,
|
||||
"9A76DDE4CA4EE660C073D288DBE4F8A128F23857881A95F18167682D47E7058F"
|
||||
]
|
||||
"pub_key": {
|
||||
"type": "ed25519",
|
||||
"data": "9A76DDE4CA4EE660C073D288DBE4F8A128F23857881A95F18167682D47E7058F"
|
||||
}
|
||||
}
|
||||
],
|
||||
"app_options": {
|
||||
|
|
|
@ -1,16 +1 @@
|
|||
{
|
||||
"address": "D42CFCB9C42DF9A73143EEA89255D1DF027B6240",
|
||||
"last_height": 0,
|
||||
"last_round": 0,
|
||||
"last_signature": null,
|
||||
"last_signbytes": "",
|
||||
"last_step": 0,
|
||||
"priv_key": [
|
||||
1,
|
||||
"6353FAF4ADEB03EA496A9EAE5BE56C4C6A851CB705401788184FDC9198413C2C9A76DDE4CA4EE660C073D288DBE4F8A128F23857881A95F18167682D47E7058F"
|
||||
],
|
||||
"pub_key": [
|
||||
1,
|
||||
"9A76DDE4CA4EE660C073D288DBE4F8A128F23857881A95F18167682D47E7058F"
|
||||
]
|
||||
}
|
||||
{"address":"D42CFCB9C42DF9A73143EEA89255D1DF027B6240","pub_key":{"type":"ed25519","data":"9A76DDE4CA4EE660C073D288DBE4F8A128F23857881A95F18167682D47E7058F"},"last_height":0,"last_round":0,"last_step":0,"last_signature":null,"priv_key":{"type":"ed25519","data":"6353FAF4ADEB03EA496A9EAE5BE56C4C6A851CB705401788184FDC9198413C2C9A76DDE4CA4EE660C073D288DBE4F8A128F23857881A95F18167682D47E7058F"}}
|
|
@ -41,7 +41,7 @@ function waitForNode() {
|
|||
exit 1
|
||||
fi
|
||||
echo "...... still waiting on $addr"
|
||||
sleep 1
|
||||
sleep 1
|
||||
curl -s $addr/status > /dev/null
|
||||
ERR=$?
|
||||
i=$((i+1))
|
||||
|
@ -52,12 +52,12 @@ function waitForNode() {
|
|||
|
||||
function waitForBlock() {
|
||||
addr=$1
|
||||
b1=`curl -s $addr/status | jq .result[1].latest_block_height`
|
||||
b1=`curl -s $addr/status | jq .result.latest_block_height`
|
||||
b2=$b1
|
||||
while [ "$b2" == "$b1" ]; do
|
||||
echo "Waiting for node $addr to commit a block ..."
|
||||
sleep 1
|
||||
b2=`curl -s $addr/status | jq .result[1].latest_block_height`
|
||||
b2=`curl -s $addr/status | jq .result.latest_block_height`
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -83,11 +83,11 @@ echo ""
|
|||
echo "... starting chains"
|
||||
echo ""
|
||||
# start the first node
|
||||
TMROOT=$BCHOME1 tendermint node --skip_upnp --log_level=info &> $LOG_DIR/chain1_tendermint.log &
|
||||
TMROOT=$BCHOME1 tendermint node --p2p.skip_upnp --log_level=info &> $LOG_DIR/chain1_tendermint.log &
|
||||
BCHOME=$BCHOME1 basecoin start --without-tendermint &> $LOG_DIR/chain1_basecoin.log &
|
||||
|
||||
# start the second node
|
||||
TMROOT=$BCHOME2 tendermint node --skip_upnp --log_level=info --node_laddr tcp://localhost:36656 --rpc_laddr tcp://localhost:36657 --proxy_app tcp://localhost:36658 &> $LOG_DIR/chain2_tendermint.log &
|
||||
TMROOT=$BCHOME2 tendermint node --p2p.skip_upnp --log_level=info --p2p.laddr tcp://localhost:36656 --rpc_laddr tcp://localhost:36657 --proxy_app tcp://localhost:36658 &> $LOG_DIR/chain2_tendermint.log &
|
||||
BCHOME=$BCHOME2 basecoin start --address tcp://localhost:36658 --without-tendermint &> $LOG_DIR/chain2_basecoin.log &
|
||||
|
||||
echo ""
|
||||
|
@ -99,7 +99,7 @@ waitForNode localhost:36657
|
|||
|
||||
# TODO: remove the sleep
|
||||
# Without it we sometimes get "Account bytes are empty for address: 053BA0F19616AFF975C8756A2CBFF04F408B4D47"
|
||||
sleep 3
|
||||
sleep 3
|
||||
|
||||
echo "... registering chain1 on chain2"
|
||||
echo ""
|
||||
|
@ -143,7 +143,7 @@ echo ""
|
|||
echo "... querying for block data"
|
||||
echo ""
|
||||
# get the header and commit for the height
|
||||
HEADER_AND_COMMIT=$(basecoin block $HEIGHT)
|
||||
HEADER_AND_COMMIT=$(basecoin block $HEIGHT)
|
||||
HEADER=$(echo $HEADER_AND_COMMIT | jq .hex.header)
|
||||
HEADER=$(removeQuotes $HEADER)
|
||||
COMMIT=$(echo $HEADER_AND_COMMIT | jq .hex.commit)
|
||||
|
|
Loading…
Reference in New Issue