diff --git a/plugin/dapp/x2ethereum/cmd/build/RopstenTest.sh b/plugin/dapp/x2ethereum/cmd/build/RopstenTest.sh index 2a93ce8bdd..238c5ecd35 100755 --- a/plugin/dapp/x2ethereum/cmd/build/RopstenTest.sh +++ b/plugin/dapp/x2ethereum/cmd/build/RopstenTest.sh @@ -268,7 +268,7 @@ function TestETH2Chain33Assets() { result=$(${Chain33Cli} x2ethereum balance -s 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -t eth | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 https://ropsten-rpc.linkpool.io/ + eth_block_wait $((maturityDegree + 3)) https://ropsten-rpc.linkpool.io/ result=$(${CLIA} relayer ethereum balance -o "${bridgeBankAddr}") cli_ret "${result}" "balance" ".balance" "0" @@ -326,7 +326,7 @@ function TestETH2Chain33Erc20() { result=$(${Chain33Cli} x2ethereum balance -s "${chain33Validator1}" -t "${tokenSymbol}" -a "${tokenAddr}" | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 https://ropsten-rpc.linkpool.io/ + eth_block_wait $((maturityDegree + 3)) https://ropsten-rpc.linkpool.io/ result=$(${CLIA} relayer ethereum balance -o "${ethReceiverAddr2}" -t "${tokenAddr}") cli_ret "${result}" "balance" ".balance" "100" @@ -438,7 +438,7 @@ function TestETH2Chain33AssetsKill() { result=$(${Chain33Cli} x2ethereum balance -s 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -t eth | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 https://ropsten-rpc.linkpool.io/ + eth_block_wait $((maturityDegree + 3)) https://ropsten-rpc.linkpool.io/ result=$(${CLIA} relayer ethereum balance -o "${bridgeBankAddr}") cli_ret "${result}" "balance" ".balance" "0.133" @@ -510,7 +510,7 @@ function TestETH2Chain33Erc20Kill() { result=$(${Chain33Cli} x2ethereum balance -s "${chain33Validator1}" -t "${tokenSymbol}" -a "${tokenAddr}" | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 https://ropsten-rpc.linkpool.io/ + eth_block_wait $((maturityDegree + 3)) https://ropsten-rpc.linkpool.io/ start_ebrelayerC diff --git a/plugin/dapp/x2ethereum/cmd/build/allRelayerTest.sh b/plugin/dapp/x2ethereum/cmd/build/allRelayerTest.sh index f270c1eeb1..3d81614d84 100755 --- a/plugin/dapp/x2ethereum/cmd/build/allRelayerTest.sh +++ b/plugin/dapp/x2ethereum/cmd/build/allRelayerTest.sh @@ -275,7 +275,7 @@ function TestETH2Chain33Assets() { result=$(${Chain33Cli} x2ethereum balance -s 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -t eth | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 + eth_block_wait $((maturityDegree + 3)) result=$(${CLIA} relayer ethereum balance -o "${bridgeBankAddr}") cli_ret "${result}" "balance" ".balance" "0" @@ -332,7 +332,7 @@ function TestETH2Chain33Erc20() { result=$(${Chain33Cli} x2ethereum balance -s "${chain33Validator1}" -t "${tokenSymbol}" -a "${tokenAddr}" | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 + eth_block_wait $((maturityDegree + 3)) result=$(${CLIA} relayer ethereum balance -o "${ethReceiverAddr2}" -t "${tokenAddr}") cli_ret "${result}" "balance" ".balance" "100" @@ -441,7 +441,7 @@ function TestETH2Chain33AssetsKill() { result=$(${Chain33Cli} x2ethereum balance -s 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -t eth | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 + eth_block_wait $((maturityDegree + 3)) result=$(${CLIA} relayer ethereum balance -o "${bridgeBankAddr}") cli_ret "${result}" "balance" ".balance" "0.1" @@ -513,7 +513,7 @@ function TestETH2Chain33Erc20Kill() { result=$(${Chain33Cli} x2ethereum balance -s "${chain33Validator1}" -t "${tokenSymbol}" -a "${tokenAddr2}" | jq ".res" | jq ".[]") balance_ret "${result}" "0" - eth_block_wait 2 + eth_block_wait $((maturityDegree + 3)) start_ebrelayerC start_ebrelayerD diff --git a/plugin/dapp/x2ethereum/cmd/test/test-rpc.sh b/plugin/dapp/x2ethereum/cmd/test/test-rpc.sh index ed13f29d80..e005751cd9 100755 --- a/plugin/dapp/x2ethereum/cmd/test/test-rpc.sh +++ b/plugin/dapp/x2ethereum/cmd/test/test-rpc.sh @@ -351,7 +351,7 @@ function TestETH2Chain33Assets() { req='{"method":"Chain33.Query","params":[{"execer":"x2ethereum","funcName":"GetRelayerBalance","payload":{"tokenSymbol":"eth","address":"'${sendAddress}'","tokenAddr":"0x0000000000000000000000000000000000000000"}}]}' queryChain33X2ethBalance "${req}" "0" - eth_block_wait 2 + eth_block_wait $((maturityDegree + 3)) req='{"method":"Manager.GetBalance","params":[{"owner":"'${bridgeBankAddr}'","tokenAddr":""}]}' queryRelayerBalance "$req" "0" @@ -408,7 +408,7 @@ function TestETH2Chain33Erc20() { req='{"method":"Chain33.Query","params":[{"execer":"x2ethereum","funcName":"GetRelayerBalance","payload":{"tokenSymbol":"testc","address":"'${chain33Validator1}'","tokenAddr":"'${tokenAddr}'"}}]}' queryChain33X2ethBalance "${req}" "0" - eth_block_wait 2 + eth_block_wait $((maturityDegree + 3)) req='{"method":"Manager.GetBalance","params":[{"owner":"'${ethReceiverAddr2}'","tokenAddr":"'${tokenAddr}'"}]}' queryRelayerBalance "$req" "100"