Commit 613bb07e authored by 张振华's avatar 张振华

update

parent a595bef3
...@@ -369,11 +369,11 @@ function main() { ...@@ -369,11 +369,11 @@ function main() {
### test cases ### ### test cases ###
ip=$(${CLI} net info | jq -r ".externalAddr") ip=$(${CLI} net info | jq -r ".externalAddr")
ip=$(echo $ip | cut -d':' -f 1) ip=$(echo "$ip" | cut -d':' -f 1)
dapp_run test "${ip}" dapp_run test "${ip}"
### rpc test ### ### rpc test ###
# rpc_test "${ip}" rpc_test "${ip}"
### finish ### ### finish ###
check_docker_container check_docker_container
......
...@@ -23,7 +23,7 @@ echo_rst() { ...@@ -23,7 +23,7 @@ echo_rst() {
CASE_ERR="err" CASE_ERR="err"
fi fi
} }
set -x
saveSeed() { saveSeed() {
seed="journey notable narrow few bar stuff notable custom miss brother attend tongue price theme resist" seed="journey notable narrow few bar stuff notable custom miss brother attend tongue price theme resist"
...@@ -92,7 +92,7 @@ queryBalance() { ...@@ -92,7 +92,7 @@ queryBalance() {
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp") ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
echo $resp|jq -r ".result" echo "$resp"|jq -r ".result"
} }
hashlock_lock() { hashlock_lock() {
...@@ -200,7 +200,7 @@ function queryTransaction() { ...@@ -200,7 +200,7 @@ function queryTransaction() {
else else
echo "====query tx=$1 success" echo "====query tx=$1 success"
ret=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result.tx") ret=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result.tx")
echo $ret echo "$ret"
return 0 return 0
break break
fi fi
...@@ -227,10 +227,10 @@ init() { ...@@ -227,10 +227,10 @@ init() {
echo "ipara=$ispara" echo "ipara=$ispara"
if [ "$ispara" == true ]; then if [ "$ispara" == true ]; then
hashlock_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.hashlock"}]}' ${MAIN_HTTP} | jq -r ".result") hashlock_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.hashlock"}]}' ${MAIN_HTTP} | jq -r ".result")
hashlock_exec="user.p.para.guess" #hashlock_exec="user.p.para.guess"
else else
hashlock_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"hashlock"}]}' ${MAIN_HTTP} | jq -r ".result") hashlock_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"hashlock"}]}' ${MAIN_HTTP} | jq -r ".result")
hashlock_exec="hashlock" #hashlock_exec="hashlock"
fi fi
echo "hashlock_addr=$hashlock_addr" echo "hashlock_addr=$hashlock_addr"
} }
...@@ -270,7 +270,7 @@ function run_test() { ...@@ -270,7 +270,7 @@ function run_test() {
block_wait 2 block_wait 2
#查询交易 #查询交易
queryTransaction $txhash queryTransaction "$txhash"
queryBalance $addr_A queryBalance $addr_A
queryBalance $addr_B queryBalance $addr_B
...@@ -281,7 +281,7 @@ function run_test() { ...@@ -281,7 +281,7 @@ function run_test() {
block_wait 2 block_wait 2
#查询交易 #查询交易
queryTransaction $txhash queryTransaction "$txhash"
queryBalance $addr_A queryBalance $addr_A
queryBalance $addr_B queryBalance $addr_B
...@@ -292,7 +292,7 @@ function run_test() { ...@@ -292,7 +292,7 @@ function run_test() {
block_wait 2 block_wait 2
#查询交易 #查询交易
queryTransaction $txhash queryTransaction "$txhash"
queryBalance $addr_A queryBalance $addr_A
queryBalance $addr_B queryBalance $addr_B
...@@ -302,7 +302,7 @@ function run_test() { ...@@ -302,7 +302,7 @@ function run_test() {
#等待2个区块 #等待2个区块
block_wait 2 block_wait 2
queryTransaction $txhash queryTransaction "$txhash"
#unlock failed #unlock failed
hashlock_unlock hashlock_unlock
...@@ -312,7 +312,7 @@ function run_test() { ...@@ -312,7 +312,7 @@ function run_test() {
block_wait 2 block_wait 2
#查询交易 #查询交易
queryTransaction $txhash queryTransaction "$txhash"
} }
function main() { function main() {
...@@ -334,5 +334,3 @@ function main() { ...@@ -334,5 +334,3 @@ function main() {
} }
main "$1" main "$1"
set +x
\ No newline at end of file
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