add paracross rpc test
@@ -11,6 +11,14 @@ echo_rst() {
fi
}
+
+paracross_GetBlock2MainInfo() {
+ height=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"paracross.GetBlock2MainInfo","params":[{"start":1,"end":3}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result.items[1].height")
+ [ "$height" -eq 2 ]
+ rst=$?
+ echo_rst $FUNCNAME $rst
+}
+
chain33_lock() {
ok=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"Chain33.Lock","params":[]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result.isOK")
[ "$ok" == true ]
@@ -18,6 +26,7 @@ chain33_lock() {
echo_rst $FUNCNAME $rst
}
+
chain33_unlock() {
ok=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"Chain33.UnLock","params":[{"passwd":"1314fuzamei","timeout":0}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result.isOK")
[ "$ok" == true ]
@@ -30,8 +39,8 @@ function dapp_rpc_test() {
MAIN_HTTP="http://$ip:8901"
echo "=========== # paracross rpc test ============="
echo "ip=$MAIN_HTTP"
- chain33_lock
+ paracross_GetBlock2MainInfo
chain33_unlock
}
-#system_rpc_test
+#dapp_rpc_test $1
