Commit 39ce184d authored by pengjun's avatar pengjun

fix linter error

parent 16c1e821
...@@ -14,9 +14,11 @@ echo_rst() { ...@@ -14,9 +14,11 @@ echo_rst() {
elif [ "$2" -eq 2 ]; then elif [ "$2" -eq 2 ]; then
echo -e "${GRE}$1 not support${NOC}" echo -e "${GRE}$1 not support${NOC}"
CASE_ERR="err" CASE_ERR="err"
echo $CASE_ERR
else else
echo -e "${RED}$1 fail${NOC}" echo -e "${RED}$1 fail${NOC}"
CASE_ERR="err" CASE_ERR="err"
echo $CASE_ERR
fi fi
} }
...@@ -41,7 +43,7 @@ chain33_BlockWait() { ...@@ -41,7 +43,7 @@ chain33_BlockWait() {
chain33_QueryTx() { chain33_QueryTx() {
local MAIN_HTTP=$2 local MAIN_HTTP=$2
chain33_BlockWait 1 $MAIN_HTTP chain33_BlockWait 1 "$MAIN_HTTP"
local txhash="$1" local txhash="$1"
local req='"method":"Chain33.QueryTransaction","params":[{"hash":"'"$txhash"'"}]' local req='"method":"Chain33.QueryTransaction","params":[{"hash":"'"$txhash"'"}]'
...@@ -49,7 +51,7 @@ chain33_QueryTx() { ...@@ -49,7 +51,7 @@ chain33_QueryTx() {
while true; do while true; do
ret=$(curl -ksd "{$req}" "${MAIN_HTTP}" | jq -r ".result.tx.hash") ret=$(curl -ksd "{$req}" "${MAIN_HTTP}" | jq -r ".result.tx.hash")
if [ "${ret}" != "${1}" ]; then if [ "${ret}" != "${1}" ]; then
chain33_BlockWait 1 $MAIN_HTTP chain33_BlockWait 1 "$MAIN_HTTP"
times=$((times - 1)) times=$((times - 1))
if [ $times -le 0 ]; then if [ $times -le 0 ]; then
echo "====query tx=$1 failed" echo "====query tx=$1 failed"
......
...@@ -37,7 +37,7 @@ pokerbull_QuitRawTx() { ...@@ -37,7 +37,7 @@ pokerbull_QuitRawTx() {
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP} chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # pokerbull quit tx end ==========" echo "========== # pokerbull quit tx end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
pokerbull_ContinueRawTx() { pokerbull_ContinueRawTx() {
...@@ -53,7 +53,7 @@ pokerbull_ContinueRawTx() { ...@@ -53,7 +53,7 @@ pokerbull_ContinueRawTx() {
chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP} chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP}
echo "========== # pokerbull continue tx end ==========" echo "========== # pokerbull continue tx end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
pokerbull_StartRawTx() { pokerbull_StartRawTx() {
...@@ -70,7 +70,7 @@ pokerbull_StartRawTx() { ...@@ -70,7 +70,7 @@ pokerbull_StartRawTx() {
GAME_ID=$RAW_TX_HASH GAME_ID=$RAW_TX_HASH
echo "========== # pokerbull start tx end ==========" echo "========== # pokerbull start tx end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
pokerbull_QueryResult() { pokerbull_QueryResult() {
...@@ -106,7 +106,7 @@ init() { ...@@ -106,7 +106,7 @@ init() {
from="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX" from="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
chain33_SendToAddress "$from" "$pokerbull_addr" 10000000000 ${MAIN_HTTP} chain33_SendToAddress "$from" "$pokerbull_addr" 10000000000 ${MAIN_HTTP}
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
function run_test() { function run_test() {
......
...@@ -23,7 +23,7 @@ retrieve_Backup() { ...@@ -23,7 +23,7 @@ retrieve_Backup() {
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP} chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # retrieve backup end ==========" echo "========== # retrieve backup end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
retrieve_Prepare() { retrieve_Prepare() {
...@@ -42,7 +42,7 @@ retrieve_Prepare() { ...@@ -42,7 +42,7 @@ retrieve_Prepare() {
chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP} chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP}
echo "========== # retrieve prepare end ==========" echo "========== # retrieve prepare end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
retrieve_Perform() { retrieve_Perform() {
...@@ -61,7 +61,7 @@ retrieve_Perform() { ...@@ -61,7 +61,7 @@ retrieve_Perform() {
chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP} chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP}
echo "========== # retrieve perform end ==========" echo "========== # retrieve perform end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
retrieve_Cancel() { retrieve_Cancel() {
...@@ -80,7 +80,7 @@ retrieve_Cancel() { ...@@ -80,7 +80,7 @@ retrieve_Cancel() {
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP} chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # retrieve cancel end ==========" echo "========== # retrieve cancel end =========="
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
retrieve_QueryResult() { retrieve_QueryResult() {
...@@ -111,7 +111,7 @@ init() { ...@@ -111,7 +111,7 @@ init() {
from="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX" from="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
chain33_SendToAddress "$from" "$retrieve_addr" 1000000000 ${MAIN_HTTP} chain33_SendToAddress "$from" "$retrieve_addr" 1000000000 ${MAIN_HTTP}
chain33_BlockWait 1 ${MAIN_HTTP} chain33_BlockWait 1 "${MAIN_HTTP}"
} }
function run_test() { function run_test() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment