Commit 30e239ab authored by 张振华's avatar 张振华

merge

parents b3cd878b 6fae0e58
#!/usr/bin/env bash
RAW_TX_HASH=""
CASE_ERR=""
#color
RED='\033[1;31m'
GRE='\033[1;32m'
NOC='\033[0m'
echo_rst() {
if [ "$2" -eq 0 ]; then
echo -e "${GRE}$1 ok${NOC}"
elif [ "$2" -eq 2 ]; then
echo -e "${GRE}$1 not support${NOC}"
CASE_ERR="err"
echo $CASE_ERR
else
echo -e "${RED}$1 fail${NOC}"
CASE_ERR="err"
echo $CASE_ERR
fi
}
chain33_BlockWait() {
local MAIN_HTTP=$2
local req='"method":"Chain33.GetLastHeader","params":[]'
cur_height=$(curl -ksd "{$req}" "${MAIN_HTTP}" | jq ".result.height")
expect=$((cur_height + ${1}))
local count=0
while true; do
new_height=$(curl -ksd "{$req}" "${MAIN_HTTP}" | jq ".result.height")
if [ "${new_height}" -ge "${expect}" ]; then
break
fi
count=$((count + 1))
sleep 1
done
echo "wait new block $count s, cur height=$expect,old=$cur_height"
}
chain33_QueryTx() {
local MAIN_HTTP=$2
chain33_BlockWait 1 "$MAIN_HTTP"
local txhash="$1"
local req='"method":"Chain33.QueryTransaction","params":[{"hash":"'"$txhash"'"}]'
local times=10
while true; do
ret=$(curl -ksd "{$req}" "${MAIN_HTTP}" | jq -r ".result.tx.hash")
if [ "${ret}" != "${1}" ]; then
chain33_BlockWait 1 "$MAIN_HTTP"
times=$((times - 1))
if [ $times -le 0 ]; then
echo "====query tx=$1 failed"
curl -ksd "{$req}" "${MAIN_HTTP}"
exit 1
fi
else
RAW_TX_HASH=$txhash
echo "====query tx=$RAW_TX_HASH success"
break
fi
done
}
chain33_SendTx() {
local signedTx=$1
local MAIN_HTTP=$2
req='"method":"Chain33.SendTransaction","params":[{"token":"BTY","data":"'"$signedTx"'"}]'
resp=$(curl -ksd "{$req}" "${MAIN_HTTP}")
err=$(jq '(.error)' <<<"$resp")
txhash=$(jq -r ".result" <<<"$resp")
if [ "$err" == null ]; then
chain33_QueryTx "$txhash" "$MAIN_HTTP"
else
echo "send tx error:$err"
fi
}
chain33_SendToAddress() {
local from="$1"
local to="$2"
local amount=$3
local MAIN_HTTP=$4
local req='"method":"Chain33.SendToAddress", "params":[{"from":"'"$from"'","to":"'"$to"'", "amount":'"$amount"', "note":"test\n"}]'
resp=$(curl -ksd "{$req}" "${MAIN_HTTP}")
ok=$(jq '(.error|not) and (.result.hash|length==66)' <<<"$resp")
[ "$ok" == true ]
hash=$(jq -r ".result.hash" <<<"$resp")
chain33_QueryTx "$hash" "$MAIN_HTTP"
}
chain33_ImportPrivkey() {
local pri="$1"
local acc="$2"
local label="$3"
local MAIN_HTTP=$4
local req='"method":"Chain33.ImportPrivkey", "params":[{"privkey":"'"$pri"'", "label":"'"$label"'"}]'
resp=$(curl -ksd "{$req}" "$MAIN_HTTP")
ok=$(jq '(.error|not) and (.result.label=="'"$label"'") and (.result.acc.addr == "'"$acc"'")' <<<"$resp")
[ "$ok" == true ]
}
chain33_SignRawTx() {
local txHex="$1"
local priKey="$2"
local MAIN_HTTP=$3
local req='"method":"Chain33.SignRawTx","params":[{"privkey":"'"$priKey"'","txHex":"'"$txHex"'","expire":"120s"}]'
signedTx=$(curl -ksd "{$req}" "${MAIN_HTTP}" | jq -r ".result")
if [ "$signedTx" != null ]; then
chain33_SendTx "$signedTx" "${MAIN_HTTP}"
else
echo "signedTx null error"
fi
}
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
# shellcheck disable=SC2128 # shellcheck disable=SC2128
RPC_TESTFILE=test-rpc.sh RPC_TESTFILE=test-rpc.sh
DAPP_TEST_COMMON=dapp-test-common.sh
function dapp_test_rpc() { function dapp_test_rpc() {
local ip=$1 local ip=$1
echo "============ # dapp rpc test begin =============" echo "============ # dapp rpc test begin ============="
if [ -d dapptest ]; then if [ -d dapptest ]; then
cp $DAPP_TEST_COMMON dapptest/
cd dapptest || return cd dapptest || return
dir=$(find . -maxdepth 1 -type d ! -name dapptest ! -name . | sed 's/^\.\///') dir=$(find . -maxdepth 1 -type d ! -name dapptest ! -name . | sed 's/^\.\///')
for app in $dir; do for app in $dir; do
......
...@@ -99,6 +99,9 @@ function base_init() { ...@@ -99,6 +99,9 @@ function base_init() {
sed -i $sedfix 's/^nodeGroupFrozenCoins=.*/nodeGroupFrozenCoins=20/g' chain33.toml sed -i $sedfix 's/^nodeGroupFrozenCoins=.*/nodeGroupFrozenCoins=20/g' chain33.toml
# ticket
sed -i $sedfix 's/^ticketPrice =.*/ticketPrice = 10000/g' chain33.toml
} }
function start() { function start() {
...@@ -143,7 +146,7 @@ function start() { ...@@ -143,7 +146,7 @@ function start() {
${CLI} block hash -t 0 ${CLI} block hash -t 0
res=$(${CLI} block hash -t 0 | jq -r ".hash") res=$(${CLI} block hash -t 0 | jq -r ".hash")
#in case changes result in genesis change #in case changes result in genesis change
if [ "${res}" != "0xa87972dfc3510cb934cb987bcb88036f7a1ffd7dc069cb9a5f0af179895fd2e8" ]; then if [ "${res}" != "0x67c58d6ba9175313f0468ae4e0ddec946549af7748037c2fdd5d54298afd20b6" ]; then
echo "genesis hash error!" echo "genesis hash error!"
exit 1 exit 1
fi fi
...@@ -203,6 +206,7 @@ function miner() { ...@@ -203,6 +206,7 @@ function miner() {
fi fi
sleep 1 sleep 1
echo "=========== # close auto mining =============" echo "=========== # close auto mining ============="
result=$(${1} wallet auto_mine -f 0 | jq ".isok") result=$(${1} wallet auto_mine -f 0 | jq ".isok")
if [ "${result}" = "false" ]; then if [ "${result}" = "false" ]; then
...@@ -331,6 +335,30 @@ function transfer() { ...@@ -331,6 +335,30 @@ function transfer() {
block_wait "${1}" 1 block_wait "${1}" 1
} }
function dapp_test_address() {
echo "=========== # import private key dapptest1 mining ============="
result=$(${1} account import_key -k 56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138 -l dapptest1 | jq ".label")
echo "${result}"
if [ -z "${result}" ]; then
exit 1
fi
sleep 1
echo "=========== # import private key dapptest2 mining ============="
result=$(${1} account import_key -k 2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989 -l dapptest2 | jq ".label")
echo "${result}"
if [ -z "${result}" ]; then
exit 1
fi
sleep 1
hash=$(${1} send coins transfer -a 1500 -n transfer -t 1PUiGcbsccfxW3zuvHXZBJfznziph5miAo -k 2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989)
echo "${hash}"
block_wait "${1}" 1
}
function base_config() { function base_config() {
# sync # sync
transfer "${CLI}" transfer "${CLI}"
...@@ -340,10 +368,13 @@ function base_config() { ...@@ -340,10 +368,13 @@ function base_config() {
function rpc_test() { function rpc_test() {
if [ "$DAPP" == "" ]; then if [ "$DAPP" == "" ]; then
system_test_rpc "http://${1}:8801" system_test_rpc "http://${1}:8801"
dapp_test_address "${CLI}"
dapp_test_rpc "http://${1}:8801" dapp_test_rpc "http://${1}:8801"
fi fi
if [ "$DAPP" == "paracross" ]; then if [ "$DAPP" == "paracross" ]; then
#system_test_rpc "http://${1}:8901" system_test_rpc "http://${1}:8901"
dapp_test_address "${CLI}"
dapp_test_rpc "http://${1}:8901" dapp_test_rpc "http://${1}:8901"
fi fi
......
...@@ -438,7 +438,7 @@ func (client *commitMsgClient) getNodeStatus(start, end int64) ([]*pt.ParacrossN ...@@ -438,7 +438,7 @@ func (client *commitMsgClient) getNodeStatus(start, end int64) ([]*pt.ParacrossN
//2,如果20个块都是 commit tx的空块,20个块打包一次发送,尽量减少commit tx造成的空块 //2,如果20个块都是 commit tx的空块,20个块打包一次发送,尽量减少commit tx造成的空块
//3,如果形如xxoxx的块排列,x代表commit空块,o代表实际的块,即只要不全部是commit块,也要全部打包一起发出去 //3,如果形如xxoxx的块排列,x代表commit空块,o代表实际的块,即只要不全部是commit块,也要全部打包一起发出去
//如果=0 意味着全部是paracross commit tx,延迟发送 //如果=0 意味着全部是paracross commit tx,延迟发送
if needSentTxs == 0 && count < types.TxGroupMaxCount { if needSentTxs == 0 && len(ret) < types.TxGroupMaxCount {
plog.Debug("para commitmsg getNodeStatus all self consensus commit tx,send delay", "start", start, "end", end) plog.Debug("para commitmsg getNodeStatus all self consensus commit tx,send delay", "start", start, "end", end)
return nil, nil return nil, nil
} }
......
...@@ -244,7 +244,7 @@ function run_testcases() { ...@@ -244,7 +244,7 @@ function run_testcases() {
blackwhite_BlackwhiteTimeoutDoneTx "$gID" blackwhite_BlackwhiteTimeoutDoneTx "$gID"
#查询部分 #查询部分
block_wait 1 block_wait 3
blackwhite_GetBlackwhiteRoundInfo "$gID" blackwhite_GetBlackwhiteRoundInfo "$gID"
blackwhite_GetBlackwhiteByStatusAndAddr "$gID" "${gameAddr1}" blackwhite_GetBlackwhiteByStatusAndAddr "$gID" "${gameAddr1}"
blackwhite_GetBlackwhiteloopResult "$gID" blackwhite_GetBlackwhiteloopResult "$gID"
......
...@@ -23,48 +23,34 @@ echo_rst() { ...@@ -23,48 +23,34 @@ echo_rst() {
lottery_addCreator_unsignedTx="0a066d616e616765123c0a3a0a0f6c6f74746572792d63726561746f721222313271796f6361794e46374c7636433971573461767873324537553431664b5366761a0361646420a08d0630c788b8f7ccbadbc0703a223151344e687572654a784b4e4266373164323642394a336642516f5163666d657a32" lottery_addCreator_unsignedTx="0a066d616e616765123c0a3a0a0f6c6f74746572792d63726561746f721222313271796f6361794e46374c7636433971573461767873324537553431664b5366761a0361646420a08d0630c788b8f7ccbadbc0703a223151344e687572654a784b4e4266373164323642394a336642516f5163666d657a32"
lottery_addCreator_unsignedTx_para="0a12757365722e702e706172612e6d616e616765123c0a3a0a0f6c6f74746572792d63726561746f721222313271796f6361794e46374c7636433971573461767873324537553431664b5366761a0361646420a08d0630a8bba1b887e7dade2b3a22314469484633317577783977356a6a733571514269474a6b4e686e71656564763157" lottery_addCreator_unsignedTx_para="0a12757365722e702e706172612e6d616e616765123c0a3a0a0f6c6f74746572792d63726561746f721222313271796f6361794e46374c7636433971573461767873324537553431664b5366761a0361646420a08d0630a8bba1b887e7dade2b3a22314469484633317577783977356a6a733571514269474a6b4e686e71656564763157"
lottery_creator_addr="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv" lottery_creator_addr="12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
lottery_creator_priv="0x4257d8692ef7fe13c68b65d6a52f03933db2fa5ce8faf210b5b8b80c721ced01"
gID="" gID=""
gResp="" gResp=""
glAddr=""
gameAddr1=""
gameAddr2=""
gameAddr3=""
lottExecAddr="" lottExecAddr=""
luckyNumber=""
purNum=30 purNum=30
drawNum=40 drawNum=40
opRatio=5 opRatio=5
devRatio=5 devRatio=5
luckyNumber=""
init() { init() {
ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")') ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")')
echo "ispara=$ispara" echo "ispara=$ispara"
if [[ $ispara == true ]]; then if [[ $ispara == true ]]; then
lottExecAddr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.lottery"}]}' ${MAIN_HTTP} | jq -r ".result") lottExecAddr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.lottery"}]}' ${MAIN_HTTP} | jq -r ".result")
chain33_SendTransaction "${lottery_addCreator_unsignedTx_para}" "${lottery_creator_addr}" chain33_SendTransaction "${lottery_addCreator_unsignedTx_para}" "${lottery_creator_priv}"
else else
lottExecAddr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"lottery"}]}' ${MAIN_HTTP} | jq -r ".result") lottExecAddr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"lottery"}]}' ${MAIN_HTTP} | jq -r ".result")
chain33_SendTransaction "${lottery_addCreator_unsignedTx}" "${lottery_creator_addr}" chain33_SendTransaction "${lottery_addCreator_unsignedTx}" "${lottery_creator_priv}"
fi fi
echo "lottExecAddr=$lottExecAddr" echo "lottExecAddr=$lottExecAddr"
} }
chain33_NewAccount() {
label=$1
result=$(curl -ksd '{"method":"Chain33.NewAccount","params":[{"label":"'"$label"'"}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result.acc.addr")
[[ $result != "" ]]
rst=$?
echo_rst "$FUNCNAME" "$rst"
glAddr=$result
echo "$glAddr"
}
function block_wait() { function block_wait() {
if [[ $# -lt 1 ]]; then if [[ $# -lt 1 ]]; then
echo "wrong block_wait params" echo "wrong block_wait params"
...@@ -142,10 +128,12 @@ chain33_SendToAddress() { ...@@ -142,10 +128,12 @@ chain33_SendToAddress() {
chain33_SendTransaction() { chain33_SendTransaction() {
rawTx=$1 rawTx=$1
addr=$2 priv=$2
#签名交易 #签名交易
resp=$(curl -ksd '{"method":"Chain33.SignRawTx","params":[{"addr":"'"$addr"'","txHex":"'"$rawTx"'","expire":"120s","fee":10000000,"index":0}]}' -H 'content-type:text/plain;' ${MAIN_HTTP}) set -x
resp=$(curl -ksd '{"method":"Chain33.SignRawTx","params":[{"privkey":"'"$priv"'","txHex":"'"$rawTx"'","expire":"120s","fee":10000000,"index":0}]}' -H 'content-type:text/plain;' ${MAIN_HTTP})
ok=$(echo "${resp}" | jq -r ".error") ok=$(echo "${resp}" | jq -r ".error")
set +x
[[ $ok == null ]] [[ $ok == null ]]
rst=$? rst=$?
echo_rst "chain33_SignRawTx" "$rst" echo_rst "chain33_SignRawTx" "$rst"
...@@ -166,7 +154,7 @@ chain33_SendTransaction() { ...@@ -166,7 +154,7 @@ chain33_SendTransaction() {
lottery_LotteryCreate() { lottery_LotteryCreate() {
#创建交易 #创建交易
addr=$1 priv=$1
set -x set -x
resp=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"lottery","actionName":"LotteryCreate", resp=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"lottery","actionName":"LotteryCreate",
"payload":{"purBlockNum":'"$purNum"',"drawBlockNum":'"$drawNum"', "opRewardRatio":'"$opRatio"',"devRewardRatio":'"$devRatio"',"fee":1000000}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP}) "payload":{"purBlockNum":'"$purNum"',"drawBlockNum":'"$drawNum"', "opRewardRatio":'"$opRatio"',"devRewardRatio":'"$devRatio"',"fee":1000000}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP})
...@@ -177,14 +165,14 @@ lottery_LotteryCreate() { ...@@ -177,14 +165,14 @@ lottery_LotteryCreate() {
echo_rst "$FUNCNAME" "$rst" echo_rst "$FUNCNAME" "$rst"
#发送交易 #发送交易
rawTx=$(echo "${resp}" | jq -r ".result") rawTx=$(echo "${resp}" | jq -r ".result")
chain33_SendTransaction "${rawTx}" "${addr}" chain33_SendTransaction "${rawTx}" "${priv}"
gID="${gResp}" gID="${gResp}"
echo "gameID $gID" echo "gameID $gID"
} }
lottery_LotteryBuy() { lottery_LotteryBuy() {
#创建交易 #创建交易
addr=$1 priv=$1
amount=$2 amount=$2
number=$3 number=$3
way=$4 way=$4
...@@ -198,12 +186,12 @@ lottery_LotteryBuy() { ...@@ -198,12 +186,12 @@ lottery_LotteryBuy() {
echo_rst "$FUNCNAME" "$rst" echo_rst "$FUNCNAME" "$rst"
#发送交易 #发送交易
rawTx=$(echo "${resp}" | jq -r ".result") rawTx=$(echo "${resp}" | jq -r ".result")
chain33_SendTransaction "${rawTx}" "${addr}" chain33_SendTransaction "${rawTx}" "${priv}"
} }
lottery_LotteryDraw() { lottery_LotteryDraw() {
#创建交易 #创建交易
addr=$1 priv=$1
set -x set -x
resp=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"lottery","actionName":"LotteryDraw", resp=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"lottery","actionName":"LotteryDraw",
"payload":{"lotteryId":"'"$gID"'","fee":1000000}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP}) "payload":{"lotteryId":"'"$gID"'","fee":1000000}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP})
...@@ -214,12 +202,12 @@ lottery_LotteryDraw() { ...@@ -214,12 +202,12 @@ lottery_LotteryDraw() {
echo_rst "$FUNCNAME" "$rst" echo_rst "$FUNCNAME" "$rst"
#发送交易 #发送交易
rawTx=$(echo "${resp}" | jq -r ".result") rawTx=$(echo "${resp}" | jq -r ".result")
chain33_SendTransaction "${rawTx}" "${addr}" chain33_SendTransaction "${rawTx}" "${priv}"
} }
lottery_LotteryClose() { lottery_LotteryClose() {
#创建交易 #创建交易
addr=$1 priv=$1
set -x set -x
resp=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"lottery","actionName":"LotteryClose", resp=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"lottery","actionName":"LotteryClose",
"payload":{"lotteryId":"'"$gID"'","fee":1000000}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP}) "payload":{"lotteryId":"'"$gID"'","fee":1000000}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP})
...@@ -230,7 +218,7 @@ lottery_LotteryClose() { ...@@ -230,7 +218,7 @@ lottery_LotteryClose() {
echo_rst "$FUNCNAME" "$rst" echo_rst "$FUNCNAME" "$rst"
#发送交易 #发送交易
rawTx=$(echo "${resp}" | jq -r ".result") rawTx=$(echo "${resp}" | jq -r ".result")
chain33_SendTransaction "${rawTx}" "${addr}" chain33_SendTransaction "${rawTx}" "${priv}"
} }
lottery_GetLotteryNormalInfo() { lottery_GetLotteryNormalInfo() {
...@@ -377,27 +365,20 @@ lottery_GetLotteryRoundGainInfo() { ...@@ -377,27 +365,20 @@ lottery_GetLotteryRoundGainInfo() {
} }
function run_testcases() { function run_testcases() {
#先创建账户地址 #账户地址
chain33_NewAccount "lottery111" gameAddr1="1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"
gameAddr1="${glAddr}" gamePriv1="0x56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138"
chain33_NewAccount "lottery222" gameAddr2="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
gameAddr2="${glAddr}" gamePriv2="0x2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989"
chain33_NewAccount "lottery333" #该账户需要转账
gameAddr3="${glAddr}" gameAddr3="12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
gamePriv3="0x9d4f8ab11361be596468b265cb66946c87873d4a119713fd0c3d8302eae0a8e4"
#给每个账户分别转帐
origAddr="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
#主链中相应账户需要转帐 #主链中相应账户需要转帐
M_HTTP=${MAIN_HTTP//8901/8801} M_HTTP=${MAIN_HTTP//8901/8801}
chain33_SendToAddress "${origAddr}" "${gameAddr1}" 300000000 "${M_HTTP}" chain33_SendToAddress "${gameAddr1}" "${gameAddr3}" 300000000 "${M_HTTP}"
chain33_SendToAddress "${origAddr}" "${gameAddr2}" 300000000 "${M_HTTP}"
chain33_SendToAddress "${origAddr}" "${gameAddr3}" 300000000 "${M_HTTP}"
#平行链相应账户需要转帐 #平行链相应账户需要转帐
chain33_SendToAddress "${origAddr}" "${gameAddr1}" 300000000 "${MAIN_HTTP}" chain33_SendToAddress "${gameAddr1}" "${gameAddr3}" 300000000 "${MAIN_HTTP}"
chain33_SendToAddress "${origAddr}" "${gameAddr2}" 300000000 "${MAIN_HTTP}"
chain33_SendToAddress "${origAddr}" "${gameAddr3}" 300000000 "${MAIN_HTTP}"
#给游戏合约中转帐 #给游戏合约中转帐
chain33_SendToAddress "${gameAddr1}" "${lottExecAddr}" 200000000 "${MAIN_HTTP}" chain33_SendToAddress "${gameAddr1}" "${lottExecAddr}" 200000000 "${MAIN_HTTP}"
...@@ -405,14 +386,14 @@ function run_testcases() { ...@@ -405,14 +386,14 @@ function run_testcases() {
chain33_SendToAddress "${gameAddr3}" "${lottExecAddr}" 200000000 "${MAIN_HTTP}" chain33_SendToAddress "${gameAddr3}" "${lottExecAddr}" 200000000 "${MAIN_HTTP}"
#创建游戏 #创建游戏
lottery_LotteryCreate "${lottery_creator_addr}" lottery_LotteryCreate "${lottery_creator_priv}"
lottery_GetLotteryNormalInfo "$gID" "${lottery_creator_addr}" lottery_GetLotteryNormalInfo "$gID" "${lottery_creator_addr}"
lottery_GetLotteryCurrentInfo "$gID" 1 0 lottery_GetLotteryCurrentInfo "$gID" 1 0
#第一次投注 #第一次投注
lottery_LotteryBuy "${gameAddr1}" 1 12345 1 lottery_LotteryBuy "${gamePriv1}" 1 12345 1
lottery_LotteryBuy "${gameAddr2}" 1 66666 2 lottery_LotteryBuy "${gamePriv2}" 1 66666 2
lottery_LotteryBuy "${gameAddr3}" 1 56789 5 lottery_LotteryBuy "${gamePriv3}" 1 56789 5
#查询 #查询
lottery_GetLotteryCurrentInfo "$gID" 2 3 lottery_GetLotteryCurrentInfo "$gID" 2 3
lottery_GetLotteryPurchaseAddr "$gID" 3 lottery_GetLotteryPurchaseAddr "$gID" 3
...@@ -420,8 +401,8 @@ function run_testcases() { ...@@ -420,8 +401,8 @@ function run_testcases() {
lottery_GetLotteryBuyRoundInfo "$gID" "${gameAddr2}" 1 1 "66666" lottery_GetLotteryBuyRoundInfo "$gID" "${gameAddr2}" 1 1 "66666"
#第二次投注 #第二次投注
lottery_LotteryBuy "${gameAddr1}" 1 12321 1 lottery_LotteryBuy "${gamePriv1}" 1 12321 1
lottery_LotteryBuy "${gameAddr3}" 1 78987 5 lottery_LotteryBuy "${gamePriv3}" 1 78987 5
#查询 #查询
lottery_GetLotteryCurrentInfo "$gID" 2 5 lottery_GetLotteryCurrentInfo "$gID" 2 5
lottery_GetLotteryPurchaseAddr "$gID" 3 lottery_GetLotteryPurchaseAddr "$gID" 3
...@@ -430,7 +411,7 @@ function run_testcases() { ...@@ -430,7 +411,7 @@ function run_testcases() {
#游戏开奖 #游戏开奖
block_wait ${drawNum} "${M_HTTP}" block_wait ${drawNum} "${M_HTTP}"
lottery_LotteryDraw "${lottery_creator_addr}" lottery_LotteryDraw "${lottery_creator_priv}"
lottery_GetLotteryCurrentInfo "$gID" 3 0 lottery_GetLotteryCurrentInfo "$gID" 3 0
#游戏查询 #游戏查询
...@@ -442,7 +423,7 @@ function run_testcases() { ...@@ -442,7 +423,7 @@ function run_testcases() {
lottery_GetLotteryRoundGainInfo "$gID" "${gameAddr3}" 1 2 lottery_GetLotteryRoundGainInfo "$gID" "${gameAddr3}" 1 2
#关闭游戏 #关闭游戏
lottery_LotteryClose "${lottery_creator_addr}" lottery_LotteryClose "${lottery_creator_priv}"
lottery_GetLotteryCurrentInfo "$gID" 4 0 lottery_GetLotteryCurrentInfo "$gID" 4 0
} }
......
...@@ -61,6 +61,10 @@ function para_set_wallet() { ...@@ -61,6 +61,10 @@ function para_set_wallet() {
para_import_key "${PARA_CLI}" "0x4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01" "test" para_import_key "${PARA_CLI}" "0x4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01" "test"
#1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY #1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY
para_import_key "${PARA_CLI}" "0x9c451df9e5cb05b88b28729aeaaeb3169a2414097401fcb4c79c1971df734588" "relay" para_import_key "${PARA_CLI}" "0x9c451df9e5cb05b88b28729aeaaeb3169a2414097401fcb4c79c1971df734588" "relay"
#1PUiGcbsccfxW3zuvHXZBJfznziph5miAo
para_import_key "${PARA_CLI}" "0x56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" "dapptest1"
#1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX
para_import_key "${PARA_CLI}" "0x2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" "dapptest2"
#super node behalf test #super node behalf test
#1Ka7EPFRqs3v9yreXG6qA4RQbNmbPJCZPj #1Ka7EPFRqs3v9yreXG6qA4RQbNmbPJCZPj
...@@ -117,6 +121,8 @@ function para_transfer() { ...@@ -117,6 +121,8 @@ function para_transfer() {
#relay rpc test #relay rpc test
para_transfer2account "12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv" para_transfer2account "12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
para_transfer2account "1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY" para_transfer2account "1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
para_transfer2account "1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"
para_transfer2account "1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
block_wait "${CLI}" 2 block_wait "${CLI}" 2
echo "=========== # main chain send to paracross =============" echo "=========== # main chain send to paracross ============="
......
...@@ -446,7 +446,7 @@ func paraInfo(cmd *cobra.Command, args []string) { ...@@ -446,7 +446,7 @@ func paraInfo(cmd *cobra.Command, args []string) {
Title: title, Title: title,
Height: height, Height: height,
} }
var res pt.RespParacrossDone var res pt.ParacrossHeightStatusRsp
ctx := jsonclient.NewRPCCtx(rpcLaddr, "paracross.GetTitleHeight", params, &res) ctx := jsonclient.NewRPCCtx(rpcLaddr, "paracross.GetTitleHeight", params, &res)
ctx.Run() ctx.Run()
} }
......
...@@ -344,6 +344,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error ...@@ -344,6 +344,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
} }
if a.exec.GetMainHeight() >= getDappForkHeight(pt.ForkCommitTx) { if a.exec.GetMainHeight() >= getDappForkHeight(pt.ForkCommitTx) {
stat.MainHeight = commit.Status.MainBlockHeight stat.MainHeight = commit.Status.MainBlockHeight
stat.MainHash = commit.Status.MainBlockHash
} }
receipt = makeCommitReceipt(a.fromaddr, commit, nil, stat) receipt = makeCommitReceipt(a.fromaddr, commit, nil, stat)
} else { } else {
...@@ -384,8 +385,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error ...@@ -384,8 +385,7 @@ func (a *action) Commit(commit *pt.ParacrossCommitAction) (*types.Receipt, error
} }
//add commit done receipt //add commit done receipt
receiptDone := makeDoneReceipt(a.fromaddr, commit, stat, int32(most), int32(commitCount), int32(len(nodes))) receiptDone := makeDoneReceipt(a.fromaddr, commit, stat, int32(most), int32(commitCount), int32(len(nodes)))
receipt.KV = append(receipt.KV, receiptDone.KV...) receipt = mergeReceipt(receipt, receiptDone)
receipt.Logs = append(receipt.Logs, receiptDone.Logs...)
//平行连进行奖励分配,考虑可能的失败,需要在保存共识高度等数据之前处理 //平行连进行奖励分配,考虑可能的失败,需要在保存共识高度等数据之前处理
if types.IsPara() { if types.IsPara() {
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"github.com/33cn/chain33/common"
dbm "github.com/33cn/chain33/common/db" dbm "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
pt "github.com/33cn/plugin/plugin/dapp/paracross/types" pt "github.com/33cn/plugin/plugin/dapp/paracross/types"
...@@ -22,6 +23,31 @@ func (p *Paracross) Query_GetTitle(in *types.ReqString) (types.Message, error) { ...@@ -22,6 +23,31 @@ func (p *Paracross) Query_GetTitle(in *types.ReqString) (types.Message, error) {
return p.paracrossGetHeight(in.GetData()) return p.paracrossGetHeight(in.GetData())
} }
// Query_GetTitleHeight query paracross status with title and height
func (p *Paracross) Query_GetTitleHeight(in *pt.ReqParacrossTitleHeight) (types.Message, error) {
if in == nil {
return nil, types.ErrInvalidParam
}
stat, err := p.paracrossGetStateTitleHeight(in.Title, in.Height)
if err != nil {
clog.Error("paracross.GetTitleHeight", "title", title, "height", in.Height, "err", err.Error())
return nil, err
}
status := stat.(*pt.ParacrossHeightStatus)
res := &pt.ParacrossHeightStatusRsp{
Status: status.Status,
Title: status.Title,
Height: status.Height,
MainHeight: status.MainHeight,
MainHash: common.ToHex(status.MainHash),
}
for i, addr := range status.Details.Addrs {
res.CommitAddrs = append(res.CommitAddrs, addr)
res.CommitBlockHash = append(res.CommitBlockHash, common.ToHex(status.Details.BlockHash[i]))
}
return res, nil
}
// Query_GetTitleByHash query paracross title by block hash // Query_GetTitleByHash query paracross title by block hash
func (p *Paracross) Query_GetTitleByHash(in *pt.ReqParacrossTitleHash) (types.Message, error) { func (p *Paracross) Query_GetTitleByHash(in *pt.ReqParacrossTitleHash) (types.Message, error) {
if in == nil { if in == nil {
...@@ -99,8 +125,8 @@ func (p *Paracross) Query_ListTitles(in *types.ReqNil) (types.Message, error) { ...@@ -99,8 +125,8 @@ func (p *Paracross) Query_ListTitles(in *types.ReqNil) (types.Message, error) {
return p.paracrossListTitles() return p.paracrossListTitles()
} }
// Query_GetTitleHeight query title height // Query_GetDoneTitleHeight query title height
func (p *Paracross) Query_GetTitleHeight(in *pt.ReqParacrossTitleHeight) (types.Message, error) { func (p *Paracross) Query_GetDoneTitleHeight(in *pt.ReqParacrossTitleHeight) (types.Message, error) {
if in == nil { if in == nil {
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
......
...@@ -20,6 +20,18 @@ message ParacrossHeightStatus { ...@@ -20,6 +20,18 @@ message ParacrossHeightStatus {
int64 height = 3; int64 height = 3;
ParacrossStatusDetails details = 4; ParacrossStatusDetails details = 4;
int64 mainHeight = 5; int64 mainHeight = 5;
bytes mainHash = 6;
}
message ParacrossHeightStatusRsp {
int32 status = 1;
string title = 2;
int64 height = 3;
int64 mainHeight = 4;
string mainHash = 5;
repeated string commitAddrs = 6;
repeated string commitBlockHash = 7;
} }
message ParacrossStatus { message ParacrossStatus {
...@@ -263,7 +275,8 @@ message ParacrossAsset { ...@@ -263,7 +275,8 @@ message ParacrossAsset {
service paracross { service paracross {
rpc GetTitle(ReqString) returns (ParacrossConsensusStatus) {} rpc GetTitle(ReqString) returns (ParacrossConsensusStatus) {}
rpc ListTitles(ReqNil) returns (RespParacrossTitles) {} rpc ListTitles(ReqNil) returns (RespParacrossTitles) {}
rpc GetTitleHeight(ReqParacrossTitleHeight) returns (RespParacrossDone) {} rpc GetDoneTitleHeight(ReqParacrossTitleHeight) returns (RespParacrossDone) {}
rpc GetTitleHeight(ReqParacrossTitleHeight) returns (ParacrossHeightStatusRsp) {}
rpc GetAssetTxResult(ReqHash) returns (ParacrossAsset) {} rpc GetAssetTxResult(ReqHash) returns (ParacrossAsset) {}
rpc IsSync(ReqNil) returns (IsCaughtUp) {} rpc IsSync(ReqNil) returns (IsCaughtUp) {}
} }
\ No newline at end of file
...@@ -72,12 +72,12 @@ func (c *Jrpc) ListTitles(req *types.ReqNil, result *interface{}) error { ...@@ -72,12 +72,12 @@ func (c *Jrpc) ListTitles(req *types.ReqNil, result *interface{}) error {
return err return err
} }
func (c *channelClient) GetTitleHeight(ctx context.Context, req *pt.ReqParacrossTitleHeight) (*pt.RespParacrossDone, error) { func (c *channelClient) GetTitleHeight(ctx context.Context, req *pt.ReqParacrossTitleHeight) (*pt.ParacrossHeightStatusRsp, error) {
data, err := c.Query(pt.GetExecName(), "GetTitleHeight", req) data, err := c.Query(pt.GetExecName(), "GetTitleHeight", req)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if resp, ok := data.(*pt.RespParacrossDone); ok { if resp, ok := data.(*pt.ParacrossHeightStatusRsp); ok {
return resp, nil return resp, nil
} }
return nil, types.ErrDecode return nil, types.ErrDecode
...@@ -93,6 +93,17 @@ func (c *Jrpc) GetTitleHeight(req *pt.ReqParacrossTitleHeight, result *interface ...@@ -93,6 +93,17 @@ func (c *Jrpc) GetTitleHeight(req *pt.ReqParacrossTitleHeight, result *interface
return err return err
} }
func (c *channelClient) GetDoneTitleHeight(ctx context.Context, req *pt.ReqParacrossTitleHeight) (*pt.RespParacrossDone, error) {
data, err := c.Query(pt.GetExecName(), "GetDoneTitleHeight", req)
if err != nil {
return nil, err
}
if resp, ok := data.(*pt.RespParacrossDone); ok {
return resp, nil
}
return nil, types.ErrDecode
}
func (c *channelClient) GetAssetTxResult(ctx context.Context, req *types.ReqHash) (*pt.ParacrossAsset, error) { func (c *channelClient) GetAssetTxResult(ctx context.Context, req *types.ReqHash) (*pt.ParacrossAsset, error) {
data, err := c.Query(pt.GetExecName(), "GetAssetTxResult", req) data, err := c.Query(pt.GetExecName(), "GetAssetTxResult", req)
if err != nil { if err != nil {
......
...@@ -77,17 +77,27 @@ func TestChannelClient_GetTitleHeight(t *testing.T) { ...@@ -77,17 +77,27 @@ func TestChannelClient_GetTitleHeight(t *testing.T) {
client := newGrpc(api) client := newGrpc(api)
client.Init("paracross", nil, nil, nil) client.Init("paracross", nil, nil, nil)
req := &pt.ReqParacrossTitleHeight{} req := &pt.ReqParacrossTitleHeight{}
api.On("Query", pt.GetExecName(), "GetTitleHeight", req).Return(&pt.RespParacrossDone{}, nil) api.On("Query", pt.GetExecName(), "GetTitleHeight", req).Return(&pt.ParacrossHeightStatusRsp{}, nil)
_, err := client.GetTitleHeight(context.Background(), req) _, err := client.GetTitleHeight(context.Background(), req)
assert.Nil(t, err) assert.Nil(t, err)
} }
func TestChannelClient_GetTitleDoneHeight(t *testing.T) {
api := new(mocks.QueueProtocolAPI)
client := newGrpc(api)
client.Init("paracross", nil, nil, nil)
req := &pt.ReqParacrossTitleHeight{}
api.On("Query", pt.GetExecName(), "GetDoneTitleHeight", req).Return(&pt.RespParacrossDone{}, nil)
_, err := client.GetDoneTitleHeight(context.Background(), req)
assert.Nil(t, err)
}
func TestJrpc_GetTitleHeight(t *testing.T) { func TestJrpc_GetTitleHeight(t *testing.T) {
api := new(mocks.QueueProtocolAPI) api := new(mocks.QueueProtocolAPI)
j := newJrpc(api) j := newJrpc(api)
req := &pt.ReqParacrossTitleHeight{} req := &pt.ReqParacrossTitleHeight{}
var result interface{} var result interface{}
api.On("Query", pt.GetExecName(), "GetTitleHeight", req).Return(&pt.RespParacrossDone{}, nil) api.On("Query", pt.GetExecName(), "GetTitleHeight", req).Return(&pt.ParacrossHeightStatusRsp{}, nil)
err := j.GetTitleHeight(req, &result) err := j.GetTitleHeight(req, &result)
assert.Nil(t, err) assert.Nil(t, err)
} }
......
...@@ -79,6 +79,7 @@ type ParacrossHeightStatus struct { ...@@ -79,6 +79,7 @@ type ParacrossHeightStatus struct {
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
Details *ParacrossStatusDetails `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"` Details *ParacrossStatusDetails `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"`
MainHeight int64 `protobuf:"varint,5,opt,name=mainHeight,proto3" json:"mainHeight,omitempty"` MainHeight int64 `protobuf:"varint,5,opt,name=mainHeight,proto3" json:"mainHeight,omitempty"`
MainHash []byte `protobuf:"bytes,6,opt,name=mainHash,proto3" json:"mainHash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -144,6 +145,100 @@ func (m *ParacrossHeightStatus) GetMainHeight() int64 { ...@@ -144,6 +145,100 @@ func (m *ParacrossHeightStatus) GetMainHeight() int64 {
return 0 return 0
} }
func (m *ParacrossHeightStatus) GetMainHash() []byte {
if m != nil {
return m.MainHash
}
return nil
}
type ParacrossHeightStatusRsp struct {
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
MainHeight int64 `protobuf:"varint,4,opt,name=mainHeight,proto3" json:"mainHeight,omitempty"`
MainHash string `protobuf:"bytes,5,opt,name=mainHash,proto3" json:"mainHash,omitempty"`
CommitAddrs []string `protobuf:"bytes,6,rep,name=commitAddrs,proto3" json:"commitAddrs,omitempty"`
CommitBlockHash []string `protobuf:"bytes,7,rep,name=commitBlockHash,proto3" json:"commitBlockHash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ParacrossHeightStatusRsp) Reset() { *m = ParacrossHeightStatusRsp{} }
func (m *ParacrossHeightStatusRsp) String() string { return proto.CompactTextString(m) }
func (*ParacrossHeightStatusRsp) ProtoMessage() {}
func (*ParacrossHeightStatusRsp) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{2}
}
func (m *ParacrossHeightStatusRsp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ParacrossHeightStatusRsp.Unmarshal(m, b)
}
func (m *ParacrossHeightStatusRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ParacrossHeightStatusRsp.Marshal(b, m, deterministic)
}
func (m *ParacrossHeightStatusRsp) XXX_Merge(src proto.Message) {
xxx_messageInfo_ParacrossHeightStatusRsp.Merge(m, src)
}
func (m *ParacrossHeightStatusRsp) XXX_Size() int {
return xxx_messageInfo_ParacrossHeightStatusRsp.Size(m)
}
func (m *ParacrossHeightStatusRsp) XXX_DiscardUnknown() {
xxx_messageInfo_ParacrossHeightStatusRsp.DiscardUnknown(m)
}
var xxx_messageInfo_ParacrossHeightStatusRsp proto.InternalMessageInfo
func (m *ParacrossHeightStatusRsp) GetStatus() int32 {
if m != nil {
return m.Status
}
return 0
}
func (m *ParacrossHeightStatusRsp) GetTitle() string {
if m != nil {
return m.Title
}
return ""
}
func (m *ParacrossHeightStatusRsp) GetHeight() int64 {
if m != nil {
return m.Height
}
return 0
}
func (m *ParacrossHeightStatusRsp) GetMainHeight() int64 {
if m != nil {
return m.MainHeight
}
return 0
}
func (m *ParacrossHeightStatusRsp) GetMainHash() string {
if m != nil {
return m.MainHash
}
return ""
}
func (m *ParacrossHeightStatusRsp) GetCommitAddrs() []string {
if m != nil {
return m.CommitAddrs
}
return nil
}
func (m *ParacrossHeightStatusRsp) GetCommitBlockHash() []string {
if m != nil {
return m.CommitBlockHash
}
return nil
}
type ParacrossStatus struct { type ParacrossStatus struct {
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
...@@ -157,7 +252,7 @@ func (m *ParacrossStatus) Reset() { *m = ParacrossStatus{} } ...@@ -157,7 +252,7 @@ func (m *ParacrossStatus) Reset() { *m = ParacrossStatus{} }
func (m *ParacrossStatus) String() string { return proto.CompactTextString(m) } func (m *ParacrossStatus) String() string { return proto.CompactTextString(m) }
func (*ParacrossStatus) ProtoMessage() {} func (*ParacrossStatus) ProtoMessage() {}
func (*ParacrossStatus) Descriptor() ([]byte, []int) { func (*ParacrossStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{2} return fileDescriptor_6a397e38c9ea6747, []int{3}
} }
func (m *ParacrossStatus) XXX_Unmarshal(b []byte) error { func (m *ParacrossStatus) XXX_Unmarshal(b []byte) error {
...@@ -213,7 +308,7 @@ func (m *ParacrossConsensusStatus) Reset() { *m = ParacrossConsensusStat ...@@ -213,7 +308,7 @@ func (m *ParacrossConsensusStatus) Reset() { *m = ParacrossConsensusStat
func (m *ParacrossConsensusStatus) String() string { return proto.CompactTextString(m) } func (m *ParacrossConsensusStatus) String() string { return proto.CompactTextString(m) }
func (*ParacrossConsensusStatus) ProtoMessage() {} func (*ParacrossConsensusStatus) ProtoMessage() {}
func (*ParacrossConsensusStatus) Descriptor() ([]byte, []int) { func (*ParacrossConsensusStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{3} return fileDescriptor_6a397e38c9ea6747, []int{4}
} }
func (m *ParacrossConsensusStatus) XXX_Unmarshal(b []byte) error { func (m *ParacrossConsensusStatus) XXX_Unmarshal(b []byte) error {
...@@ -277,7 +372,7 @@ func (m *ParaNodeAddrConfig) Reset() { *m = ParaNodeAddrConfig{} } ...@@ -277,7 +372,7 @@ func (m *ParaNodeAddrConfig) Reset() { *m = ParaNodeAddrConfig{} }
func (m *ParaNodeAddrConfig) String() string { return proto.CompactTextString(m) } func (m *ParaNodeAddrConfig) String() string { return proto.CompactTextString(m) }
func (*ParaNodeAddrConfig) ProtoMessage() {} func (*ParaNodeAddrConfig) ProtoMessage() {}
func (*ParaNodeAddrConfig) Descriptor() ([]byte, []int) { func (*ParaNodeAddrConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{4} return fileDescriptor_6a397e38c9ea6747, []int{5}
} }
func (m *ParaNodeAddrConfig) XXX_Unmarshal(b []byte) error { func (m *ParaNodeAddrConfig) XXX_Unmarshal(b []byte) error {
...@@ -345,7 +440,7 @@ func (m *ParaNodeVoteDetail) Reset() { *m = ParaNodeVoteDetail{} } ...@@ -345,7 +440,7 @@ func (m *ParaNodeVoteDetail) Reset() { *m = ParaNodeVoteDetail{} }
func (m *ParaNodeVoteDetail) String() string { return proto.CompactTextString(m) } func (m *ParaNodeVoteDetail) String() string { return proto.CompactTextString(m) }
func (*ParaNodeVoteDetail) ProtoMessage() {} func (*ParaNodeVoteDetail) ProtoMessage() {}
func (*ParaNodeVoteDetail) Descriptor() ([]byte, []int) { func (*ParaNodeVoteDetail) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{5} return fileDescriptor_6a397e38c9ea6747, []int{6}
} }
func (m *ParaNodeVoteDetail) XXX_Unmarshal(b []byte) error { func (m *ParaNodeVoteDetail) XXX_Unmarshal(b []byte) error {
...@@ -396,7 +491,7 @@ func (m *ParaNodeAddrStatus) Reset() { *m = ParaNodeAddrStatus{} } ...@@ -396,7 +491,7 @@ func (m *ParaNodeAddrStatus) Reset() { *m = ParaNodeAddrStatus{} }
func (m *ParaNodeAddrStatus) String() string { return proto.CompactTextString(m) } func (m *ParaNodeAddrStatus) String() string { return proto.CompactTextString(m) }
func (*ParaNodeAddrStatus) ProtoMessage() {} func (*ParaNodeAddrStatus) ProtoMessage() {}
func (*ParaNodeAddrStatus) Descriptor() ([]byte, []int) { func (*ParaNodeAddrStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{6} return fileDescriptor_6a397e38c9ea6747, []int{7}
} }
func (m *ParaNodeAddrStatus) XXX_Unmarshal(b []byte) error { func (m *ParaNodeAddrStatus) XXX_Unmarshal(b []byte) error {
...@@ -473,7 +568,7 @@ func (m *ReceiptParaNodeConfig) Reset() { *m = ReceiptParaNodeConfig{} } ...@@ -473,7 +568,7 @@ func (m *ReceiptParaNodeConfig) Reset() { *m = ReceiptParaNodeConfig{} }
func (m *ReceiptParaNodeConfig) String() string { return proto.CompactTextString(m) } func (m *ReceiptParaNodeConfig) String() string { return proto.CompactTextString(m) }
func (*ReceiptParaNodeConfig) ProtoMessage() {} func (*ReceiptParaNodeConfig) ProtoMessage() {}
func (*ReceiptParaNodeConfig) Descriptor() ([]byte, []int) { func (*ReceiptParaNodeConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{7} return fileDescriptor_6a397e38c9ea6747, []int{8}
} }
func (m *ReceiptParaNodeConfig) XXX_Unmarshal(b []byte) error { func (m *ReceiptParaNodeConfig) XXX_Unmarshal(b []byte) error {
...@@ -535,7 +630,7 @@ func (m *ReceiptParaNodeVoteRecord) Reset() { *m = ReceiptParaNodeVoteRe ...@@ -535,7 +630,7 @@ func (m *ReceiptParaNodeVoteRecord) Reset() { *m = ReceiptParaNodeVoteRe
func (m *ReceiptParaNodeVoteRecord) String() string { return proto.CompactTextString(m) } func (m *ReceiptParaNodeVoteRecord) String() string { return proto.CompactTextString(m) }
func (*ReceiptParaNodeVoteRecord) ProtoMessage() {} func (*ReceiptParaNodeVoteRecord) ProtoMessage() {}
func (*ReceiptParaNodeVoteRecord) Descriptor() ([]byte, []int) { func (*ReceiptParaNodeVoteRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{8} return fileDescriptor_6a397e38c9ea6747, []int{9}
} }
func (m *ReceiptParaNodeVoteRecord) XXX_Unmarshal(b []byte) error { func (m *ReceiptParaNodeVoteRecord) XXX_Unmarshal(b []byte) error {
...@@ -594,7 +689,7 @@ func (m *ReceiptParaNodeVoteDone) Reset() { *m = ReceiptParaNodeVoteDone ...@@ -594,7 +689,7 @@ func (m *ReceiptParaNodeVoteDone) Reset() { *m = ReceiptParaNodeVoteDone
func (m *ReceiptParaNodeVoteDone) String() string { return proto.CompactTextString(m) } func (m *ReceiptParaNodeVoteDone) String() string { return proto.CompactTextString(m) }
func (*ReceiptParaNodeVoteDone) ProtoMessage() {} func (*ReceiptParaNodeVoteDone) ProtoMessage() {}
func (*ReceiptParaNodeVoteDone) Descriptor() ([]byte, []int) { func (*ReceiptParaNodeVoteDone) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{9} return fileDescriptor_6a397e38c9ea6747, []int{10}
} }
func (m *ReceiptParaNodeVoteDone) XXX_Unmarshal(b []byte) error { func (m *ReceiptParaNodeVoteDone) XXX_Unmarshal(b []byte) error {
...@@ -679,7 +774,7 @@ func (m *ParaNodeGroupConfig) Reset() { *m = ParaNodeGroupConfig{} } ...@@ -679,7 +774,7 @@ func (m *ParaNodeGroupConfig) Reset() { *m = ParaNodeGroupConfig{} }
func (m *ParaNodeGroupConfig) String() string { return proto.CompactTextString(m) } func (m *ParaNodeGroupConfig) String() string { return proto.CompactTextString(m) }
func (*ParaNodeGroupConfig) ProtoMessage() {} func (*ParaNodeGroupConfig) ProtoMessage() {}
func (*ParaNodeGroupConfig) Descriptor() ([]byte, []int) { func (*ParaNodeGroupConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{10} return fileDescriptor_6a397e38c9ea6747, []int{11}
} }
func (m *ParaNodeGroupConfig) XXX_Unmarshal(b []byte) error { func (m *ParaNodeGroupConfig) XXX_Unmarshal(b []byte) error {
...@@ -752,7 +847,7 @@ func (m *ParaNodeGroupStatus) Reset() { *m = ParaNodeGroupStatus{} } ...@@ -752,7 +847,7 @@ func (m *ParaNodeGroupStatus) Reset() { *m = ParaNodeGroupStatus{} }
func (m *ParaNodeGroupStatus) String() string { return proto.CompactTextString(m) } func (m *ParaNodeGroupStatus) String() string { return proto.CompactTextString(m) }
func (*ParaNodeGroupStatus) ProtoMessage() {} func (*ParaNodeGroupStatus) ProtoMessage() {}
func (*ParaNodeGroupStatus) Descriptor() ([]byte, []int) { func (*ParaNodeGroupStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{11} return fileDescriptor_6a397e38c9ea6747, []int{12}
} }
func (m *ParaNodeGroupStatus) XXX_Unmarshal(b []byte) error { func (m *ParaNodeGroupStatus) XXX_Unmarshal(b []byte) error {
...@@ -836,7 +931,7 @@ func (m *ReceiptParaNodeGroupConfig) Reset() { *m = ReceiptParaNodeGroup ...@@ -836,7 +931,7 @@ func (m *ReceiptParaNodeGroupConfig) Reset() { *m = ReceiptParaNodeGroup
func (m *ReceiptParaNodeGroupConfig) String() string { return proto.CompactTextString(m) } func (m *ReceiptParaNodeGroupConfig) String() string { return proto.CompactTextString(m) }
func (*ReceiptParaNodeGroupConfig) ProtoMessage() {} func (*ReceiptParaNodeGroupConfig) ProtoMessage() {}
func (*ReceiptParaNodeGroupConfig) Descriptor() ([]byte, []int) { func (*ReceiptParaNodeGroupConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{12} return fileDescriptor_6a397e38c9ea6747, []int{13}
} }
func (m *ReceiptParaNodeGroupConfig) XXX_Unmarshal(b []byte) error { func (m *ReceiptParaNodeGroupConfig) XXX_Unmarshal(b []byte) error {
...@@ -899,7 +994,7 @@ func (m *ReqParacrossNodeInfo) Reset() { *m = ReqParacrossNodeInfo{} } ...@@ -899,7 +994,7 @@ func (m *ReqParacrossNodeInfo) Reset() { *m = ReqParacrossNodeInfo{} }
func (m *ReqParacrossNodeInfo) String() string { return proto.CompactTextString(m) } func (m *ReqParacrossNodeInfo) String() string { return proto.CompactTextString(m) }
func (*ReqParacrossNodeInfo) ProtoMessage() {} func (*ReqParacrossNodeInfo) ProtoMessage() {}
func (*ReqParacrossNodeInfo) Descriptor() ([]byte, []int) { func (*ReqParacrossNodeInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{13} return fileDescriptor_6a397e38c9ea6747, []int{14}
} }
func (m *ReqParacrossNodeInfo) XXX_Unmarshal(b []byte) error { func (m *ReqParacrossNodeInfo) XXX_Unmarshal(b []byte) error {
...@@ -952,7 +1047,7 @@ func (m *RespParacrossNodeAddrs) Reset() { *m = RespParacrossNodeAddrs{} ...@@ -952,7 +1047,7 @@ func (m *RespParacrossNodeAddrs) Reset() { *m = RespParacrossNodeAddrs{}
func (m *RespParacrossNodeAddrs) String() string { return proto.CompactTextString(m) } func (m *RespParacrossNodeAddrs) String() string { return proto.CompactTextString(m) }
func (*RespParacrossNodeAddrs) ProtoMessage() {} func (*RespParacrossNodeAddrs) ProtoMessage() {}
func (*RespParacrossNodeAddrs) Descriptor() ([]byte, []int) { func (*RespParacrossNodeAddrs) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{14} return fileDescriptor_6a397e38c9ea6747, []int{15}
} }
func (m *RespParacrossNodeAddrs) XXX_Unmarshal(b []byte) error { func (m *RespParacrossNodeAddrs) XXX_Unmarshal(b []byte) error {
...@@ -991,7 +1086,7 @@ func (m *RespParacrossNodeGroups) Reset() { *m = RespParacrossNodeGroups ...@@ -991,7 +1086,7 @@ func (m *RespParacrossNodeGroups) Reset() { *m = RespParacrossNodeGroups
func (m *RespParacrossNodeGroups) String() string { return proto.CompactTextString(m) } func (m *RespParacrossNodeGroups) String() string { return proto.CompactTextString(m) }
func (*RespParacrossNodeGroups) ProtoMessage() {} func (*RespParacrossNodeGroups) ProtoMessage() {}
func (*RespParacrossNodeGroups) Descriptor() ([]byte, []int) { func (*RespParacrossNodeGroups) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{15} return fileDescriptor_6a397e38c9ea6747, []int{16}
} }
func (m *RespParacrossNodeGroups) XXX_Unmarshal(b []byte) error { func (m *RespParacrossNodeGroups) XXX_Unmarshal(b []byte) error {
...@@ -1033,7 +1128,7 @@ func (m *ParaBlock2MainMap) Reset() { *m = ParaBlock2MainMap{} } ...@@ -1033,7 +1128,7 @@ func (m *ParaBlock2MainMap) Reset() { *m = ParaBlock2MainMap{} }
func (m *ParaBlock2MainMap) String() string { return proto.CompactTextString(m) } func (m *ParaBlock2MainMap) String() string { return proto.CompactTextString(m) }
func (*ParaBlock2MainMap) ProtoMessage() {} func (*ParaBlock2MainMap) ProtoMessage() {}
func (*ParaBlock2MainMap) Descriptor() ([]byte, []int) { func (*ParaBlock2MainMap) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{16} return fileDescriptor_6a397e38c9ea6747, []int{17}
} }
func (m *ParaBlock2MainMap) XXX_Unmarshal(b []byte) error { func (m *ParaBlock2MainMap) XXX_Unmarshal(b []byte) error {
...@@ -1093,7 +1188,7 @@ func (m *ParaBlock2MainInfo) Reset() { *m = ParaBlock2MainInfo{} } ...@@ -1093,7 +1188,7 @@ func (m *ParaBlock2MainInfo) Reset() { *m = ParaBlock2MainInfo{} }
func (m *ParaBlock2MainInfo) String() string { return proto.CompactTextString(m) } func (m *ParaBlock2MainInfo) String() string { return proto.CompactTextString(m) }
func (*ParaBlock2MainInfo) ProtoMessage() {} func (*ParaBlock2MainInfo) ProtoMessage() {}
func (*ParaBlock2MainInfo) Descriptor() ([]byte, []int) { func (*ParaBlock2MainInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{17} return fileDescriptor_6a397e38c9ea6747, []int{18}
} }
func (m *ParaBlock2MainInfo) XXX_Unmarshal(b []byte) error { func (m *ParaBlock2MainInfo) XXX_Unmarshal(b []byte) error {
...@@ -1146,7 +1241,7 @@ func (m *ParacrossNodeStatus) Reset() { *m = ParacrossNodeStatus{} } ...@@ -1146,7 +1241,7 @@ func (m *ParacrossNodeStatus) Reset() { *m = ParacrossNodeStatus{} }
func (m *ParacrossNodeStatus) String() string { return proto.CompactTextString(m) } func (m *ParacrossNodeStatus) String() string { return proto.CompactTextString(m) }
func (*ParacrossNodeStatus) ProtoMessage() {} func (*ParacrossNodeStatus) ProtoMessage() {}
func (*ParacrossNodeStatus) Descriptor() ([]byte, []int) { func (*ParacrossNodeStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{18} return fileDescriptor_6a397e38c9ea6747, []int{19}
} }
func (m *ParacrossNodeStatus) XXX_Unmarshal(b []byte) error { func (m *ParacrossNodeStatus) XXX_Unmarshal(b []byte) error {
...@@ -1276,7 +1371,7 @@ func (m *ParacrossCommitAction) Reset() { *m = ParacrossCommitAction{} } ...@@ -1276,7 +1371,7 @@ func (m *ParacrossCommitAction) Reset() { *m = ParacrossCommitAction{} }
func (m *ParacrossCommitAction) String() string { return proto.CompactTextString(m) } func (m *ParacrossCommitAction) String() string { return proto.CompactTextString(m) }
func (*ParacrossCommitAction) ProtoMessage() {} func (*ParacrossCommitAction) ProtoMessage() {}
func (*ParacrossCommitAction) Descriptor() ([]byte, []int) { func (*ParacrossCommitAction) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{19} return fileDescriptor_6a397e38c9ea6747, []int{20}
} }
func (m *ParacrossCommitAction) XXX_Unmarshal(b []byte) error { func (m *ParacrossCommitAction) XXX_Unmarshal(b []byte) error {
...@@ -1316,7 +1411,7 @@ func (m *ParacrossMinerAction) Reset() { *m = ParacrossMinerAction{} } ...@@ -1316,7 +1411,7 @@ func (m *ParacrossMinerAction) Reset() { *m = ParacrossMinerAction{} }
func (m *ParacrossMinerAction) String() string { return proto.CompactTextString(m) } func (m *ParacrossMinerAction) String() string { return proto.CompactTextString(m) }
func (*ParacrossMinerAction) ProtoMessage() {} func (*ParacrossMinerAction) ProtoMessage() {}
func (*ParacrossMinerAction) Descriptor() ([]byte, []int) { func (*ParacrossMinerAction) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{20} return fileDescriptor_6a397e38c9ea6747, []int{21}
} }
func (m *ParacrossMinerAction) XXX_Unmarshal(b []byte) error { func (m *ParacrossMinerAction) XXX_Unmarshal(b []byte) error {
...@@ -1373,7 +1468,7 @@ func (m *ParacrossAction) Reset() { *m = ParacrossAction{} } ...@@ -1373,7 +1468,7 @@ func (m *ParacrossAction) Reset() { *m = ParacrossAction{} }
func (m *ParacrossAction) String() string { return proto.CompactTextString(m) } func (m *ParacrossAction) String() string { return proto.CompactTextString(m) }
func (*ParacrossAction) ProtoMessage() {} func (*ParacrossAction) ProtoMessage() {}
func (*ParacrossAction) Descriptor() ([]byte, []int) { func (*ParacrossAction) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{21} return fileDescriptor_6a397e38c9ea6747, []int{22}
} }
func (m *ParacrossAction) XXX_Unmarshal(b []byte) error { func (m *ParacrossAction) XXX_Unmarshal(b []byte) error {
...@@ -1751,7 +1846,7 @@ func (m *ReceiptParacrossCommit) Reset() { *m = ReceiptParacrossCommit{} ...@@ -1751,7 +1846,7 @@ func (m *ReceiptParacrossCommit) Reset() { *m = ReceiptParacrossCommit{}
func (m *ReceiptParacrossCommit) String() string { return proto.CompactTextString(m) } func (m *ReceiptParacrossCommit) String() string { return proto.CompactTextString(m) }
func (*ReceiptParacrossCommit) ProtoMessage() {} func (*ReceiptParacrossCommit) ProtoMessage() {}
func (*ReceiptParacrossCommit) Descriptor() ([]byte, []int) { func (*ReceiptParacrossCommit) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{22} return fileDescriptor_6a397e38c9ea6747, []int{23}
} }
func (m *ReceiptParacrossCommit) XXX_Unmarshal(b []byte) error { func (m *ReceiptParacrossCommit) XXX_Unmarshal(b []byte) error {
...@@ -1811,7 +1906,7 @@ func (m *ReceiptParacrossMiner) Reset() { *m = ReceiptParacrossMiner{} } ...@@ -1811,7 +1906,7 @@ func (m *ReceiptParacrossMiner) Reset() { *m = ReceiptParacrossMiner{} }
func (m *ReceiptParacrossMiner) String() string { return proto.CompactTextString(m) } func (m *ReceiptParacrossMiner) String() string { return proto.CompactTextString(m) }
func (*ReceiptParacrossMiner) ProtoMessage() {} func (*ReceiptParacrossMiner) ProtoMessage() {}
func (*ReceiptParacrossMiner) Descriptor() ([]byte, []int) { func (*ReceiptParacrossMiner) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{23} return fileDescriptor_6a397e38c9ea6747, []int{24}
} }
func (m *ReceiptParacrossMiner) XXX_Unmarshal(b []byte) error { func (m *ReceiptParacrossMiner) XXX_Unmarshal(b []byte) error {
...@@ -1857,7 +1952,7 @@ func (m *ReceiptParacrossDone) Reset() { *m = ReceiptParacrossDone{} } ...@@ -1857,7 +1952,7 @@ func (m *ReceiptParacrossDone) Reset() { *m = ReceiptParacrossDone{} }
func (m *ReceiptParacrossDone) String() string { return proto.CompactTextString(m) } func (m *ReceiptParacrossDone) String() string { return proto.CompactTextString(m) }
func (*ReceiptParacrossDone) ProtoMessage() {} func (*ReceiptParacrossDone) ProtoMessage() {}
func (*ReceiptParacrossDone) Descriptor() ([]byte, []int) { func (*ReceiptParacrossDone) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{24} return fileDescriptor_6a397e38c9ea6747, []int{25}
} }
func (m *ReceiptParacrossDone) XXX_Unmarshal(b []byte) error { func (m *ReceiptParacrossDone) XXX_Unmarshal(b []byte) error {
...@@ -1946,7 +2041,7 @@ func (m *ReceiptParacrossRecord) Reset() { *m = ReceiptParacrossRecord{} ...@@ -1946,7 +2041,7 @@ func (m *ReceiptParacrossRecord) Reset() { *m = ReceiptParacrossRecord{}
func (m *ReceiptParacrossRecord) String() string { return proto.CompactTextString(m) } func (m *ReceiptParacrossRecord) String() string { return proto.CompactTextString(m) }
func (*ReceiptParacrossRecord) ProtoMessage() {} func (*ReceiptParacrossRecord) ProtoMessage() {}
func (*ReceiptParacrossRecord) Descriptor() ([]byte, []int) { func (*ReceiptParacrossRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{25} return fileDescriptor_6a397e38c9ea6747, []int{26}
} }
func (m *ReceiptParacrossRecord) XXX_Unmarshal(b []byte) error { func (m *ReceiptParacrossRecord) XXX_Unmarshal(b []byte) error {
...@@ -1994,7 +2089,7 @@ func (m *ParacrossTx) Reset() { *m = ParacrossTx{} } ...@@ -1994,7 +2089,7 @@ func (m *ParacrossTx) Reset() { *m = ParacrossTx{} }
func (m *ParacrossTx) String() string { return proto.CompactTextString(m) } func (m *ParacrossTx) String() string { return proto.CompactTextString(m) }
func (*ParacrossTx) ProtoMessage() {} func (*ParacrossTx) ProtoMessage() {}
func (*ParacrossTx) Descriptor() ([]byte, []int) { func (*ParacrossTx) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{26} return fileDescriptor_6a397e38c9ea6747, []int{27}
} }
func (m *ParacrossTx) XXX_Unmarshal(b []byte) error { func (m *ParacrossTx) XXX_Unmarshal(b []byte) error {
...@@ -2035,7 +2130,7 @@ func (m *ReqParacrossTitleHeight) Reset() { *m = ReqParacrossTitleHeight ...@@ -2035,7 +2130,7 @@ func (m *ReqParacrossTitleHeight) Reset() { *m = ReqParacrossTitleHeight
func (m *ReqParacrossTitleHeight) String() string { return proto.CompactTextString(m) } func (m *ReqParacrossTitleHeight) String() string { return proto.CompactTextString(m) }
func (*ReqParacrossTitleHeight) ProtoMessage() {} func (*ReqParacrossTitleHeight) ProtoMessage() {}
func (*ReqParacrossTitleHeight) Descriptor() ([]byte, []int) { func (*ReqParacrossTitleHeight) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{27} return fileDescriptor_6a397e38c9ea6747, []int{28}
} }
func (m *ReqParacrossTitleHeight) XXX_Unmarshal(b []byte) error { func (m *ReqParacrossTitleHeight) XXX_Unmarshal(b []byte) error {
...@@ -2088,7 +2183,7 @@ func (m *RespParacrossDone) Reset() { *m = RespParacrossDone{} } ...@@ -2088,7 +2183,7 @@ func (m *RespParacrossDone) Reset() { *m = RespParacrossDone{} }
func (m *RespParacrossDone) String() string { return proto.CompactTextString(m) } func (m *RespParacrossDone) String() string { return proto.CompactTextString(m) }
func (*RespParacrossDone) ProtoMessage() {} func (*RespParacrossDone) ProtoMessage() {}
func (*RespParacrossDone) Descriptor() ([]byte, []int) { func (*RespParacrossDone) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{28} return fileDescriptor_6a397e38c9ea6747, []int{29}
} }
func (m *RespParacrossDone) XXX_Unmarshal(b []byte) error { func (m *RespParacrossDone) XXX_Unmarshal(b []byte) error {
...@@ -2176,7 +2271,7 @@ func (m *RespParacrossTitles) Reset() { *m = RespParacrossTitles{} } ...@@ -2176,7 +2271,7 @@ func (m *RespParacrossTitles) Reset() { *m = RespParacrossTitles{} }
func (m *RespParacrossTitles) String() string { return proto.CompactTextString(m) } func (m *RespParacrossTitles) String() string { return proto.CompactTextString(m) }
func (*RespParacrossTitles) ProtoMessage() {} func (*RespParacrossTitles) ProtoMessage() {}
func (*RespParacrossTitles) Descriptor() ([]byte, []int) { func (*RespParacrossTitles) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{29} return fileDescriptor_6a397e38c9ea6747, []int{30}
} }
func (m *RespParacrossTitles) XXX_Unmarshal(b []byte) error { func (m *RespParacrossTitles) XXX_Unmarshal(b []byte) error {
...@@ -2216,7 +2311,7 @@ func (m *ReqParacrossTitleHash) Reset() { *m = ReqParacrossTitleHash{} } ...@@ -2216,7 +2311,7 @@ func (m *ReqParacrossTitleHash) Reset() { *m = ReqParacrossTitleHash{} }
func (m *ReqParacrossTitleHash) String() string { return proto.CompactTextString(m) } func (m *ReqParacrossTitleHash) String() string { return proto.CompactTextString(m) }
func (*ReqParacrossTitleHash) ProtoMessage() {} func (*ReqParacrossTitleHash) ProtoMessage() {}
func (*ReqParacrossTitleHash) Descriptor() ([]byte, []int) { func (*ReqParacrossTitleHash) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{30} return fileDescriptor_6a397e38c9ea6747, []int{31}
} }
func (m *ReqParacrossTitleHash) XXX_Unmarshal(b []byte) error { func (m *ReqParacrossTitleHash) XXX_Unmarshal(b []byte) error {
...@@ -2276,7 +2371,7 @@ func (m *ParacrossAsset) Reset() { *m = ParacrossAsset{} } ...@@ -2276,7 +2371,7 @@ func (m *ParacrossAsset) Reset() { *m = ParacrossAsset{} }
func (m *ParacrossAsset) String() string { return proto.CompactTextString(m) } func (m *ParacrossAsset) String() string { return proto.CompactTextString(m) }
func (*ParacrossAsset) ProtoMessage() {} func (*ParacrossAsset) ProtoMessage() {}
func (*ParacrossAsset) Descriptor() ([]byte, []int) { func (*ParacrossAsset) Descriptor() ([]byte, []int) {
return fileDescriptor_6a397e38c9ea6747, []int{31} return fileDescriptor_6a397e38c9ea6747, []int{32}
} }
func (m *ParacrossAsset) XXX_Unmarshal(b []byte) error { func (m *ParacrossAsset) XXX_Unmarshal(b []byte) error {
...@@ -2377,6 +2472,7 @@ func (m *ParacrossAsset) GetSuccess() bool { ...@@ -2377,6 +2472,7 @@ func (m *ParacrossAsset) GetSuccess() bool {
func init() { func init() {
proto.RegisterType((*ParacrossStatusDetails)(nil), "types.ParacrossStatusDetails") proto.RegisterType((*ParacrossStatusDetails)(nil), "types.ParacrossStatusDetails")
proto.RegisterType((*ParacrossHeightStatus)(nil), "types.ParacrossHeightStatus") proto.RegisterType((*ParacrossHeightStatus)(nil), "types.ParacrossHeightStatus")
proto.RegisterType((*ParacrossHeightStatusRsp)(nil), "types.ParacrossHeightStatusRsp")
proto.RegisterType((*ParacrossStatus)(nil), "types.ParacrossStatus") proto.RegisterType((*ParacrossStatus)(nil), "types.ParacrossStatus")
proto.RegisterType((*ParacrossConsensusStatus)(nil), "types.ParacrossConsensusStatus") proto.RegisterType((*ParacrossConsensusStatus)(nil), "types.ParacrossConsensusStatus")
proto.RegisterType((*ParaNodeAddrConfig)(nil), "types.ParaNodeAddrConfig") proto.RegisterType((*ParaNodeAddrConfig)(nil), "types.ParaNodeAddrConfig")
...@@ -2412,112 +2508,116 @@ func init() { ...@@ -2412,112 +2508,116 @@ func init() {
func init() { proto.RegisterFile("paracross.proto", fileDescriptor_6a397e38c9ea6747) } func init() { proto.RegisterFile("paracross.proto", fileDescriptor_6a397e38c9ea6747) }
var fileDescriptor_6a397e38c9ea6747 = []byte{ var fileDescriptor_6a397e38c9ea6747 = []byte{
// 1679 bytes of a gzipped FileDescriptorProto // 1743 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6e, 0x1b, 0x47, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x18, 0x4b, 0x6f, 0x1c, 0x45,
0x12, 0xe6, 0xf0, 0x57, 0x2c, 0x49, 0x94, 0xd4, 0xb6, 0x64, 0x9a, 0xeb, 0xf5, 0x12, 0x03, 0xef, 0x73, 0x67, 0x9f, 0xde, 0xb2, 0xbd, 0xb6, 0x3b, 0xb1, 0xb3, 0xd9, 0x2f, 0x5f, 0xb2, 0x1a, 0x05,
0x42, 0x58, 0x78, 0x65, 0xaf, 0xb4, 0xf0, 0x62, 0x61, 0x2c, 0x76, 0x65, 0xd9, 0x16, 0x05, 0xff, 0x64, 0xa1, 0xe0, 0x04, 0x1b, 0x05, 0xa1, 0x08, 0x81, 0xe3, 0x24, 0x5e, 0x2b, 0x0f, 0x45, 0x63,
0x20, 0x18, 0x29, 0x3f, 0x97, 0x00, 0x19, 0x0f, 0x5b, 0xd2, 0x20, 0xe4, 0xf4, 0x78, 0xba, 0x69, 0xf3, 0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0xcd, 0x2d, 0xb1, 0x77, 0x01, 0x1e, 0x05, 0x42, 0xea, 0x64, 0x98,
0xf1, 0xa0, 0xb8, 0x5f, 0x21, 0xb7, 0xa1, 0x79, 0xc0, 0x0f, 0xcf, 0x93, 0xa8, 0x1c, 0xc1, 0x9a, 0xcf, 0x59, 0x3c, 0x09, 0x06, 0x9d, 0xce, 0xa4, 0x5c, 0x50, 0xa4, 0x6e, 0x89, 0x3d, 0x05, 0xb6,
0x26, 0x0f, 0xf8, 0x5e, 0x38, 0x39, 0x39, 0x15, 0x6f, 0xa7, 0x7e, 0xe5, 0x45, 0x13, 0xbf, 0xf0, 0xcd, 0xc9, 0x28, 0xb3, 0x30, 0xaf, 0xe6, 0x2c, 0x26, 0x15, 0x6e, 0xe7, 0xd4, 0xfc, 0x72, 0x4b,
0xee, 0xfc, 0x1c, 0x00, 0x00, 0xff, 0xff, 0x16, 0xa8, 0xae, 0xc0, 0x3e, 0x16, 0x00, 0x00, 0x6c, 0x17, 0x5a, 0xa9, 0x35, 0x67, 0xe4, 0x76, 0x6d, 0xea, 0x94, 0x10, 0xb1, 0x5b, 0x62, 0x77,
0x60, 0x71, 0x9b, 0x4b, 0x4a, 0xad, 0x6c, 0xcb, 0x6c, 0xe5, 0x6c, 0x31, 0x2d, 0x3a, 0xcb, 0x45,
0x36, 0x44, 0xee, 0x96, 0xd8, 0x0d, 0xa8, 0xef, 0x88, 0xdd, 0x93, 0xb0, 0x5f, 0x74, 0xcd, 0x92,
0x06, 0x77, 0xc4, 0x96, 0x3f, 0x3a, 0x3c, 0x92, 0x1f, 0xc6, 0x6e, 0xe9, 0x59, 0x9d, 0xfe, 0xa0,
0x6f, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x57, 0x1a, 0xc4, 0x9e, 0x17, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
...@@ -2534,7 +2634,8 @@ const _ = grpc.SupportPackageIsVersion4 ...@@ -2534,7 +2634,8 @@ const _ = grpc.SupportPackageIsVersion4
type ParacrossClient interface { type ParacrossClient interface {
GetTitle(ctx context.Context, in *types.ReqString, opts ...grpc.CallOption) (*ParacrossConsensusStatus, error) GetTitle(ctx context.Context, in *types.ReqString, opts ...grpc.CallOption) (*ParacrossConsensusStatus, error)
ListTitles(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*RespParacrossTitles, error) ListTitles(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*RespParacrossTitles, error)
GetTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*RespParacrossDone, error) GetDoneTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*RespParacrossDone, error)
GetTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*ParacrossHeightStatusRsp, error)
GetAssetTxResult(ctx context.Context, in *types.ReqHash, opts ...grpc.CallOption) (*ParacrossAsset, error) GetAssetTxResult(ctx context.Context, in *types.ReqHash, opts ...grpc.CallOption) (*ParacrossAsset, error)
IsSync(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*types.IsCaughtUp, error) IsSync(ctx context.Context, in *types.ReqNil, opts ...grpc.CallOption) (*types.IsCaughtUp, error)
} }
...@@ -2565,8 +2666,17 @@ func (c *paracrossClient) ListTitles(ctx context.Context, in *types.ReqNil, opts ...@@ -2565,8 +2666,17 @@ func (c *paracrossClient) ListTitles(ctx context.Context, in *types.ReqNil, opts
return out, nil return out, nil
} }
func (c *paracrossClient) GetTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*RespParacrossDone, error) { func (c *paracrossClient) GetDoneTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*RespParacrossDone, error) {
out := new(RespParacrossDone) out := new(RespParacrossDone)
err := c.cc.Invoke(ctx, "/types.paracross/GetDoneTitleHeight", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *paracrossClient) GetTitleHeight(ctx context.Context, in *ReqParacrossTitleHeight, opts ...grpc.CallOption) (*ParacrossHeightStatusRsp, error) {
out := new(ParacrossHeightStatusRsp)
err := c.cc.Invoke(ctx, "/types.paracross/GetTitleHeight", in, out, opts...) err := c.cc.Invoke(ctx, "/types.paracross/GetTitleHeight", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
...@@ -2596,7 +2706,8 @@ func (c *paracrossClient) IsSync(ctx context.Context, in *types.ReqNil, opts ... ...@@ -2596,7 +2706,8 @@ func (c *paracrossClient) IsSync(ctx context.Context, in *types.ReqNil, opts ...
type ParacrossServer interface { type ParacrossServer interface {
GetTitle(context.Context, *types.ReqString) (*ParacrossConsensusStatus, error) GetTitle(context.Context, *types.ReqString) (*ParacrossConsensusStatus, error)
ListTitles(context.Context, *types.ReqNil) (*RespParacrossTitles, error) ListTitles(context.Context, *types.ReqNil) (*RespParacrossTitles, error)
GetTitleHeight(context.Context, *ReqParacrossTitleHeight) (*RespParacrossDone, error) GetDoneTitleHeight(context.Context, *ReqParacrossTitleHeight) (*RespParacrossDone, error)
GetTitleHeight(context.Context, *ReqParacrossTitleHeight) (*ParacrossHeightStatusRsp, error)
GetAssetTxResult(context.Context, *types.ReqHash) (*ParacrossAsset, error) GetAssetTxResult(context.Context, *types.ReqHash) (*ParacrossAsset, error)
IsSync(context.Context, *types.ReqNil) (*types.IsCaughtUp, error) IsSync(context.Context, *types.ReqNil) (*types.IsCaughtUp, error)
} }
...@@ -2641,6 +2752,24 @@ func _Paracross_ListTitles_Handler(srv interface{}, ctx context.Context, dec fun ...@@ -2641,6 +2752,24 @@ func _Paracross_ListTitles_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Paracross_GetDoneTitleHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReqParacrossTitleHeight)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ParacrossServer).GetDoneTitleHeight(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/types.paracross/GetDoneTitleHeight",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ParacrossServer).GetDoneTitleHeight(ctx, req.(*ReqParacrossTitleHeight))
}
return interceptor(ctx, in, info, handler)
}
func _Paracross_GetTitleHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Paracross_GetTitleHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReqParacrossTitleHeight) in := new(ReqParacrossTitleHeight)
if err := dec(in); err != nil { if err := dec(in); err != nil {
...@@ -2708,6 +2837,10 @@ var _Paracross_serviceDesc = grpc.ServiceDesc{ ...@@ -2708,6 +2837,10 @@ var _Paracross_serviceDesc = grpc.ServiceDesc{
Handler: _Paracross_ListTitles_Handler, Handler: _Paracross_ListTitles_Handler,
}, },
{ {
MethodName: "GetDoneTitleHeight",
Handler: _Paracross_GetDoneTitleHeight_Handler,
},
{
MethodName: "GetTitleHeight", MethodName: "GetTitleHeight",
Handler: _Paracross_GetTitleHeight_Handler, Handler: _Paracross_GetTitleHeight_Handler,
}, },
......
all:
chmod +x ./build.sh
./build.sh $(OUT) $(FLAG)
#!/bin/sh
strpwd=$(pwd)
strcmd=${strpwd##*dapp/}
strapp=${strcmd%/cmd*}
OUT_DIR="${1}/$strapp"
#FLAG=$2
mkdir -p "${OUT_DIR}"
cp ./build/* "${OUT_DIR}"
OUT_TESTDIR="${1}/dapptest/$strapp"
mkdir -p "${OUT_TESTDIR}"
cp ./build/test-rpc.sh "${OUT_TESTDIR}"
#!/usr/bin/env bash
# shellcheck disable=SC2128
set -e
set -o pipefail
MAIN_HTTP=""
GAME_ID=""
# shellcheck source=/dev/null
source ../dapp-test-common.sh
pokerbull_PlayRawTx() {
echo "========== # pokerbull play tx begin =========="
tx=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"pokerbull","actionName":"Play","payload":{"gameId":"pokerbull-abc", "value":"1000000000", "round":1}}]}' ${MAIN_HTTP} | jq -r ".result")
data=$(curl -ksd '{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}' ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # pokerbull play tx end =========="
chain33_BlockWait 1 ${MAIN_HTTP}
}
pokerbull_QuitRawTx() {
echo "========== # pokerbull quit tx begin =========="
tx=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"pokerbull","actionName":"Quit","payload":{"gameId":"'$GAME_ID'"}}]}' ${MAIN_HTTP} | jq -r ".result")
data=$(curl -ksd '{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}' ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # pokerbull quit tx end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
pokerbull_ContinueRawTx() {
echo "========== # pokerbull continue tx begin =========="
tx=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"pokerbull","actionName":"Continue","payload":{"gameId":"'$GAME_ID'"}}]}' ${MAIN_HTTP} | jq -r ".result")
data=$(curl -ksd '{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}' ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP}
echo "========== # pokerbull continue tx end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
pokerbull_StartRawTx() {
echo "========== # pokerbull start tx begin =========="
tx=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"pokerbull","actionName":"Start","payload":{"value":"1000000000", "playerNum":"2"}}]}' ${MAIN_HTTP} | jq -r ".result")
data=$(curl -ksd '{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}' ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
GAME_ID=$RAW_TX_HASH
echo "========== # pokerbull start tx end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
pokerbull_QueryResult() {
echo "========== # pokerbull query result begin =========="
local req='"method":"Chain33.Query","params":[{"execer":"pokerbull","funcName":"QueryGameByID","payload":{"gameId":"'$GAME_ID'"}}]'
data=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result")
ok=$(jq '(.game.gameId == "$GAME_ID")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
data=$(curl -ksd '{"method":"Chain33.Query","params":[{"execer":"pokerbull","funcName":"QueryGameByAddr","payload":{"addr":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"}}]}' ${MAIN_HTTP} | jq -r ".result")
[ "$data" != null ]
echo_rst "$FUNCNAME" "$?"
data=$(curl -ksd '{"method":"Chain33.Query","params":[{"execer":"pokerbull","funcName":"QueryGameByStatus","payload":{"status":"3"}}]}' ${MAIN_HTTP} | jq -r ".result")
[ "$data" != null ]
echo_rst "$FUNCNAME" "$?"
echo "========== # pokerbull query result end =========="
}
init() {
ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")')
echo "ipara=$ispara"
if [ "$ispara" == true ]; then
pokerbull_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.pokerbull"}]}' ${MAIN_HTTP} | jq -r ".result")
else
pokerbull_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"pokerbull"}]}' ${MAIN_HTTP} | jq -r ".result")
fi
local from="1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"
chain33_SendToAddress "$from" "$pokerbull_addr" 10000000000 ${MAIN_HTTP}
from="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
chain33_SendToAddress "$from" "$pokerbull_addr" 10000000000 ${MAIN_HTTP}
chain33_BlockWait 1 "${MAIN_HTTP}"
}
function run_test() {
pokerbull_StartRawTx
pokerbull_ContinueRawTx
pokerbull_QuitRawTx
pokerbull_PlayRawTx
pokerbull_QueryResult
}
function main() {
MAIN_HTTP="$1"
echo "=========== # pokerbull rpc test ============="
echo "ip=$MAIN_HTTP"
init
run_test
if [ -n "$CASE_ERR" ]; then
echo -e "${RED}=============Pokerbull Rpc Test Fail=============${NOC}"
exit 1
else
echo -e "${GRE}=============Pokerbull Rpc Test Pass==============${NOC}"
fi
}
main "$1"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package commands package cmd
import ( import (
"fmt" "fmt"
......
...@@ -6,7 +6,7 @@ package pokerbull ...@@ -6,7 +6,7 @@ package pokerbull
import ( import (
"github.com/33cn/chain33/pluginmgr" "github.com/33cn/chain33/pluginmgr"
"github.com/33cn/plugin/plugin/dapp/pokerbull/commands" "github.com/33cn/plugin/plugin/dapp/pokerbull/cmd"
"github.com/33cn/plugin/plugin/dapp/pokerbull/executor" "github.com/33cn/plugin/plugin/dapp/pokerbull/executor"
"github.com/33cn/plugin/plugin/dapp/pokerbull/types" "github.com/33cn/plugin/plugin/dapp/pokerbull/types"
) )
...@@ -16,6 +16,6 @@ func init() { ...@@ -16,6 +16,6 @@ func init() {
Name: types.PokerBullX, Name: types.PokerBullX,
ExecName: executor.GetName(), ExecName: executor.GetName(),
Exec: executor.Init, Exec: executor.Init,
Cmd: commands.PokerBullCmd, Cmd: cmd.PokerBullCmd,
}) })
} }
all:
chmod +x ./build.sh
./build.sh $(OUT) $(FLAG)
\ No newline at end of file
#!/bin/sh
strpwd=$(pwd)
strcmd=${strpwd##*dapp/}
strapp=${strcmd%/cmd*}
OUT_DIR="${1}/$strapp"
#FLAG=$2
mkdir -p "${OUT_DIR}"
cp ./build/* "${OUT_DIR}"
OUT_TESTDIR="${1}/dapptest/$strapp"
mkdir -p "${OUT_TESTDIR}"
cp ./build/test-rpc.sh "${OUT_TESTDIR}"
#!/usr/bin/env bash
# shellcheck disable=SC2128
set -e
set -o pipefail
MAIN_HTTP=""
# shellcheck source=/dev/null
source ../dapp-test-common.sh
retrieve_Backup() {
echo "========== # retrieve backup begin =========="
local req='"method":"retrieve.CreateRawRetrieveBackupTx","params":[{"backupAddr":"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX","defaultAddr":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo","delayPeriod": 61}]'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # retrieve backup end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
retrieve_Prepare() {
echo "========== # retrieve prepare begin =========="
local req='"method":"retrieve.CreateRawRetrievePrepareTx","params":[{"backupAddr":"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX","defaultAddr":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"}]'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP}
echo "========== # retrieve prepare end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
retrieve_Perform() {
echo "========== # retrieve perform begin =========="
local req='"method":"retrieve.CreateRawRetrievePerformTx","params":[{"backupAddr":"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX","defaultAddr":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"}]'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "2116459C0EC8ED01AA0EEAE35CAC5C96F94473F7816F114873291217303F6989" ${MAIN_HTTP}
echo "========== # retrieve perform end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
retrieve_Cancel() {
echo "========== # retrieve cancel begin =========="
local req='"method":"retrieve.CreateRawRetrieveCancelTx","params":[{"backupAddr":"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX","defaultAddr":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"}]'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "56942AD84CCF4788ED6DACBC005A1D0C4F91B63BCF0C99A02BE03C8DEAE71138" ${MAIN_HTTP}
echo "========== # retrieve cancel end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
retrieve_QueryResult() {
echo "========== # retrieve query result begin =========="
local status=$1
local req='"method":"Chain33.Query","params":[{"execer":"retrieve","funcName":"GetRetrieveInfo","payload":{"backupAddress":"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX", "defaultAddress":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"}}]'
data=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result")
ok=$(jq '(.status == '"$status"')' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
echo "========== # retrieve query result end =========="
}
init() {
ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")')
echo "ipara=$ispara"
if [ "$ispara" == true ]; then
retrieve_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.retrieve"}]}' ${MAIN_HTTP} | jq -r ".result")
else
retrieve_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"retrieve"}]}' ${MAIN_HTTP} | jq -r ".result")
fi
local from="1PUiGcbsccfxW3zuvHXZBJfznziph5miAo"
chain33_SendToAddress "$from" "$retrieve_addr" 1000000000 ${MAIN_HTTP}
from="1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX"
chain33_SendToAddress "$from" "$retrieve_addr" 1000000000 ${MAIN_HTTP}
chain33_BlockWait 1 "${MAIN_HTTP}"
}
function run_test() {
retrieve_Backup
retrieve_QueryResult 1
retrieve_Prepare
retrieve_QueryResult 2
retrieve_Cancel
retrieve_QueryResult 4
retrieve_Backup
retrieve_QueryResult 1
retrieve_Prepare
retrieve_QueryResult 2
sleep 61
retrieve_Perform
retrieve_QueryResult 3
}
function main() {
MAIN_HTTP="$1"
echo "=========== # retrieve rpc test ============="
echo "ip=$MAIN_HTTP"
init
run_test
if [ -n "$CASE_ERR" ]; then
echo -e "${RED}=============retrieve Rpc Test Fail=============${NOC}"
exit 1
else
echo -e "${GRE}=============retrieve Rpc Test Pass==============${NOC}"
fi
}
main "$1"
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package commands package cmd
import ( import (
"fmt" "fmt"
......
...@@ -6,7 +6,7 @@ package retrieve ...@@ -6,7 +6,7 @@ package retrieve
import ( import (
"github.com/33cn/chain33/pluginmgr" "github.com/33cn/chain33/pluginmgr"
"github.com/33cn/plugin/plugin/dapp/retrieve/commands" "github.com/33cn/plugin/plugin/dapp/retrieve/cmd"
"github.com/33cn/plugin/plugin/dapp/retrieve/executor" "github.com/33cn/plugin/plugin/dapp/retrieve/executor"
"github.com/33cn/plugin/plugin/dapp/retrieve/rpc" "github.com/33cn/plugin/plugin/dapp/retrieve/rpc"
"github.com/33cn/plugin/plugin/dapp/retrieve/types" "github.com/33cn/plugin/plugin/dapp/retrieve/types"
...@@ -17,7 +17,7 @@ func init() { ...@@ -17,7 +17,7 @@ func init() {
Name: types.RetrieveX, Name: types.RetrieveX,
ExecName: executor.GetName(), ExecName: executor.GetName(),
Exec: executor.Init, Exec: executor.Init,
Cmd: commands.RetrieveCmd, Cmd: cmd.RetrieveCmd,
RPC: rpc.Init, RPC: rpc.Init,
}) })
} }
...@@ -16,7 +16,7 @@ func (c *channelClient) Backup(ctx context.Context, v *rt.BackupRetrieve) (*type ...@@ -16,7 +16,7 @@ func (c *channelClient) Backup(ctx context.Context, v *rt.BackupRetrieve) (*type
Ty: rt.RetrieveActionBackup, Ty: rt.RetrieveActionBackup,
Value: &rt.RetrieveAction_Backup{Backup: v}, Value: &rt.RetrieveAction_Backup{Backup: v},
} }
tx, err := types.CreateFormatTx(string(rt.ExecerRetrieve), types.Encode(backup)) tx, err := types.CreateFormatTx(types.ExecName(rt.RetrieveX), types.Encode(backup))
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -29,7 +29,7 @@ func (c *channelClient) Prepare(ctx context.Context, v *rt.PrepareRetrieve) (*ty ...@@ -29,7 +29,7 @@ func (c *channelClient) Prepare(ctx context.Context, v *rt.PrepareRetrieve) (*ty
Ty: rt.RetrieveActionPrepare, Ty: rt.RetrieveActionPrepare,
Value: &rt.RetrieveAction_Prepare{Prepare: v}, Value: &rt.RetrieveAction_Prepare{Prepare: v},
} }
tx, err := types.CreateFormatTx(string(rt.ExecerRetrieve), types.Encode(prepare)) tx, err := types.CreateFormatTx(types.ExecName(rt.RetrieveX), types.Encode(prepare))
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -43,7 +43,7 @@ func (c *channelClient) Perform(ctx context.Context, v *rt.PerformRetrieve) (*ty ...@@ -43,7 +43,7 @@ func (c *channelClient) Perform(ctx context.Context, v *rt.PerformRetrieve) (*ty
Ty: rt.RetrieveActionPerform, Ty: rt.RetrieveActionPerform,
Value: &rt.RetrieveAction_Perform{Perform: v}, Value: &rt.RetrieveAction_Perform{Perform: v},
} }
tx, err := types.CreateFormatTx(string(rt.ExecerRetrieve), types.Encode(perform)) tx, err := types.CreateFormatTx(types.ExecName(rt.RetrieveX), types.Encode(perform))
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -56,7 +56,7 @@ func (c *channelClient) Cancel(ctx context.Context, v *rt.CancelRetrieve) (*type ...@@ -56,7 +56,7 @@ func (c *channelClient) Cancel(ctx context.Context, v *rt.CancelRetrieve) (*type
Ty: rt.RetrieveActionCancel, Ty: rt.RetrieveActionCancel,
Value: &rt.RetrieveAction_Cancel{Cancel: v}, Value: &rt.RetrieveAction_Cancel{Cancel: v},
} }
tx, err := types.CreateFormatTx(string(rt.ExecerRetrieve), types.Encode(cancel)) tx, err := types.CreateFormatTx(types.ExecName(rt.RetrieveX), types.Encode(cancel))
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -47,19 +47,23 @@ func (mem *Mempool) SetQueueClient(client queue.Client) { ...@@ -47,19 +47,23 @@ func (mem *Mempool) SetQueueClient(client queue.Client) {
go func() { go func() {
defer mem.wg.Done() defer mem.wg.Done()
for msg := range client.Recv() { for msg := range client.Recv() {
var err error
var reply interface{}
switch msg.Ty { switch msg.Ty {
case types.EventTx: case types.EventTx:
mlog.Info("Receive msg from para mempool") mlog.Info("Receive msg from para mempool")
tx := msg.GetData().(*types.Transaction) tx := msg.GetData().(*types.Transaction)
reply, err := mem.mainGrpcCli.SendTransaction(context.Background(), tx) reply, err = mem.mainGrpcCli.SendTransaction(context.Background(), tx)
if err != nil { case types.EventGetProperFee:
msg.Reply(client.NewMessage(mem.key, types.EventReply, err)) reply, err = mem.mainGrpcCli.GetProperFee(context.Background(), &types.ReqNil{})
} else {
msg.Reply(client.NewMessage(mem.key, types.EventReply, reply))
}
default: default:
msg.Reply(client.NewMessage(mem.key, types.EventReply, types.ErrActionNotSupport)) msg.Reply(client.NewMessage(mem.key, types.EventReply, types.ErrActionNotSupport))
} }
if err != nil {
msg.Reply(client.NewMessage(mem.key, types.EventReply, err))
} else {
msg.Reply(client.NewMessage(mem.key, types.EventReply, reply))
}
} }
}() }()
} }
......
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