mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 12:15:45 +00:00
TMSP -> ABCI
This commit is contained in:
@@ -21,13 +21,13 @@ echo ""
|
||||
|
||||
|
||||
###########################
|
||||
# test using the tmsp-cli
|
||||
# test using the abci-cli
|
||||
###########################
|
||||
|
||||
echo "... testing query with tmsp-cli"
|
||||
echo "... testing query with abci-cli"
|
||||
|
||||
# we should be able to look up the key
|
||||
RESPONSE=`tmsp-cli query \"$KEY\"`
|
||||
RESPONSE=`abci-cli query \"$KEY\"`
|
||||
|
||||
set +e
|
||||
A=`echo $RESPONSE | grep '"exists":true'`
|
||||
@@ -39,7 +39,7 @@ fi
|
||||
set -e
|
||||
|
||||
# we should not be able to look up the value
|
||||
RESPONSE=`tmsp-cli query \"$VALUE\"`
|
||||
RESPONSE=`abci-cli query \"$VALUE\"`
|
||||
set +e
|
||||
A=`echo $RESPONSE | grep '"exists":true'`
|
||||
if [[ $? == 0 ]]; then
|
||||
@@ -50,13 +50,13 @@ fi
|
||||
set -e
|
||||
|
||||
#############################
|
||||
# test using the /tmsp_query
|
||||
# test using the /abci_query
|
||||
#############################
|
||||
|
||||
echo "... testing query with /tmsp_query"
|
||||
echo "... testing query with /abci_query"
|
||||
|
||||
# we should be able to look up the key
|
||||
RESPONSE=`curl -s 127.0.0.1:46657/tmsp_query?query=$(toHex $KEY)`
|
||||
RESPONSE=`curl -s 127.0.0.1:46657/abci_query?query=$(toHex $KEY)`
|
||||
RESPONSE=`echo $RESPONSE | jq .result[1].result.Data | xxd -r -p`
|
||||
|
||||
set +e
|
||||
@@ -69,7 +69,7 @@ fi
|
||||
set -e
|
||||
|
||||
# we should not be able to look up the value
|
||||
RESPONSE=`curl -s 127.0.0.1:46657/tmsp_query?query=\"$(toHex $VALUE)\"`
|
||||
RESPONSE=`curl -s 127.0.0.1:46657/abci_query?query=\"$(toHex $VALUE)\"`
|
||||
RESPONSE=`echo $RESPONSE | jq .result[1].result.Data | xxd -r -p`
|
||||
set +e
|
||||
A=`echo $RESPONSE | grep '"exists":true'`
|
||||
|
||||
+4
-4
@@ -65,9 +65,9 @@ function counter_over_grpc() {
|
||||
rm -rf $TMROOT
|
||||
tendermint init
|
||||
echo "Starting counter_over_grpc"
|
||||
counter --serial --tmsp grpc > /dev/null &
|
||||
counter --serial --abci grpc > /dev/null &
|
||||
pid_counter=$!
|
||||
tendermint node --tmsp grpc > tendermint.log &
|
||||
tendermint node --abci grpc > tendermint.log &
|
||||
pid_tendermint=$!
|
||||
sleep 5
|
||||
|
||||
@@ -81,11 +81,11 @@ function counter_over_grpc_grpc() {
|
||||
rm -rf $TMROOT
|
||||
tendermint init
|
||||
echo "Starting counter_over_grpc_grpc (ie. with grpc broadcast_tx)"
|
||||
counter --serial --tmsp grpc > /dev/null &
|
||||
counter --serial --abci grpc > /dev/null &
|
||||
pid_counter=$!
|
||||
sleep 1
|
||||
GRPC_PORT=36656
|
||||
tendermint node --tmsp grpc --grpc_laddr tcp://localhost:$GRPC_PORT > tendermint.log &
|
||||
tendermint node --abci grpc --grpc_laddr tcp://localhost:$GRPC_PORT > tendermint.log &
|
||||
pid_tendermint=$!
|
||||
sleep 5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user