Commit c56e55d2 authored by QM's avatar QM

updata

parent 27843129
...@@ -25,9 +25,9 @@ function exit_cp_file() { ...@@ -25,9 +25,9 @@ function exit_cp_file() {
for name in a b c d; do for name in a b c d; do
# shellcheck disable=SC2154 # shellcheck disable=SC2154
docker cp "${dockerNamePrefix}_ebrelayer${name}_1":/root/logs/x2Ethereum_relayer.log "$dirName/ebrelayer$name.log" docker cp "${dockerNamePrefix}_ebrelayer${name}_1":/root/logs/x2Ethereum_relayer.log "${dirName}/ebrelayer${name}.log"
done done
docker cp "${dockerNamePrefix}_chain33_1":/root/logs/chain33.log "$dirName/chain33.log" docker cp "${dockerNamePrefix}_chain33_1":/root/logs/chain33.log "${dirName}/chain33.log"
exit 1 exit 1
} }
...@@ -46,9 +46,9 @@ function copyErrLogs() { ...@@ -46,9 +46,9 @@ function copyErrLogs() {
for name in a b c d; do for name in a b c d; do
# shellcheck disable=SC2154 # shellcheck disable=SC2154
docker cp "${dockerNamePrefix}_ebrelayer${name}_rpc_1":/root/logs/x2Ethereum_relayer.log "$dirName/ebrelayer$name_rpc.log" docker cp "${dockerNamePrefix}_ebrelayer${name}_rpc_1":/root/logs/x2Ethereum_relayer.log "${dirName}/ebrelayer${name}_rpc.log"
done done
docker cp "${dockerNamePrefix}_chain33_1":/root/logs/chain33.log "$dirName/chain33_rpc.log" docker cp "${dockerNamePrefix}_chain33_1":/root/logs/chain33.log "${dirName}/chain33_rpc.log"
fi fi
} }
...@@ -492,7 +492,6 @@ function updata_relayer_toml_rpc() { ...@@ -492,7 +492,6 @@ function updata_relayer_toml_rpc() {
local pushHost=$(get_inet_addr) local pushHost=$(get_inet_addr)
if [[ ${pushHost} == "" ]]; then if [[ ${pushHost} == "" ]]; then
echo -e "${RED}pushHost is empty${NOC}" echo -e "${RED}pushHost is empty${NOC}"
copyErrLogs
fi fi
# shellcheck disable=SC2155 # shellcheck disable=SC2155
......
...@@ -44,7 +44,6 @@ function queryExecBalance() { ...@@ -44,7 +44,6 @@ function queryExecBalance() {
local balance=$(echo "$resp" | jq -r ".result" | jq ".[].balance") local balance=$(echo "$resp" | jq -r ".result" | jq ".[].balance")
if [ "${balance}" != "${2}" ]; then if [ "${balance}" != "${2}" ]; then
echo_rst "queryExecBalance" "1" "${balance} != ${2}" echo_rst "queryExecBalance" "1" "${balance} != ${2}"
copyErrLogs
fi fi
} }
...@@ -56,7 +55,6 @@ function queryChain33Balance() { ...@@ -56,7 +55,6 @@ function queryChain33Balance() {
local balance=$(echo $resp | jq -r ".result.execAccount" | jq ".[].account.balance") local balance=$(echo $resp | jq -r ".result.execAccount" | jq ".[].account.balance")
if [ "${balance}" != "${2}" ]; then if [ "${balance}" != "${2}" ]; then
echo_rst "queryChain33Balance" "1" "${balance} != ${2}" echo_rst "queryChain33Balance" "1" "${balance} != ${2}"
copyErrLogs
fi fi
} }
...@@ -76,7 +74,6 @@ function queryChain33X2ethBalance() { ...@@ -76,7 +74,6 @@ function queryChain33X2ethBalance() {
local balance=$(echo "${RETURN_RESP}" | jq -r ".res" | jq ".[].balance" | sed 's/\"//g') local balance=$(echo "${RETURN_RESP}" | jq -r ".res" | jq ".[].balance" | sed 's/\"//g')
if [ "${balance}" != "${2}" ]; then if [ "${balance}" != "${2}" ]; then
echo_rst "queryChain33X2ethBalance" "1" "${balance} != ${2}" echo_rst "queryChain33X2ethBalance" "1" "${balance} != ${2}"
copyErrLogs
fi fi
} }
...@@ -125,7 +122,6 @@ function StartRelayerAndDeploy() { ...@@ -125,7 +122,6 @@ function StartRelayerAndDeploy() {
ebrelayeraRpcHost=$(get_docker_addr "${dockerNamePrefix}_ebrelayera_rpc_1") ebrelayeraRpcHost=$(get_docker_addr "${dockerNamePrefix}_ebrelayera_rpc_1")
if [[ ${ebrelayeraRpcHost} == "" ]]; then if [[ ${ebrelayeraRpcHost} == "" ]]; then
echo -e "${RED}ebrelayeraRpcHost a is empty${NOC}" echo -e "${RED}ebrelayeraRpcHost a is empty${NOC}"
copyErrLogs
fi fi
CLIA_HTTP="http://${ebrelayeraRpcHost}:9901" CLIA_HTTP="http://${ebrelayeraRpcHost}:9901"
...@@ -408,13 +404,15 @@ function rpc_test() { ...@@ -408,13 +404,15 @@ function rpc_test() {
if [ "$ispara" == false ]; then if [ "$ispara" == false ]; then
# init # init
StartRelayerAndDeploy StartRelayerAndDeploy
InitChain33Vilators # InitChain33Vilators
EthImportKey # EthImportKey
#
# # test
# TestChain33ToEthAssets
# TestETH2Chain33Assets
# TestETH2Chain33Erc20
# test copyErrLogs
TestChain33ToEthAssets
TestETH2Chain33Assets
TestETH2Chain33Erc20
# docker-compose -f ./x2ethereum/docker-compose-x2ethereum.yml down # docker-compose -f ./x2ethereum/docker-compose-x2ethereum.yml down
fi fi
......
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