Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
0d6978b5
Commit
0d6978b5
authored
Jun 16, 2020
by
QM
Committed by
vipwzw
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add x2ethereum test-rpc.sh
parent
fe6dd0c6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
58 deletions
+1
-58
allRelayerTest.sh
plugin/dapp/x2ethereum/cmd/build/allRelayerTest.sh
+1
-1
publicTest.sh
plugin/dapp/x2ethereum/cmd/build/publicTest.sh
+0
-57
test-rpc.sh
plugin/dapp/x2ethereum/cmd/test/test-rpc.sh
+0
-0
No files found.
plugin/dapp/x2ethereum/cmd/build/allRelayerTest.sh
View file @
0d6978b5
...
@@ -135,7 +135,7 @@ function StartRelayerAndDeploy() {
...
@@ -135,7 +135,7 @@ function StartRelayerAndDeploy() {
kill_ebrelayer
"./A/ebrelayer"
kill_ebrelayer
"./A/ebrelayer"
# 修改 relayer.toml 配置文件
# 修改 relayer.toml 配置文件
updata_relayer_toml
"
${
BridgeRegistry
}
"
${
maturityDegree
}
"./A/relayer.toml"
updata_relayer_toml
"
${
BridgeRegistry
}
"
${
maturityDegree
}
"./A/relayer.toml"
updata_all_relayer_toml
2
updata_all_relayer_toml
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
echo
-e
"
${
GRE
}
===========
$FUNCNAME
end ===========
${
NOC
}
"
}
}
...
...
plugin/dapp/x2ethereum/cmd/build/publicTest.sh
View file @
0d6978b5
...
@@ -357,10 +357,6 @@ function updata_relayer_toml() {
...
@@ -357,10 +357,6 @@ function updata_relayer_toml() {
sed
-i
's/^EthBlockFetchPeriod=.*/EthBlockFetchPeriod=500/g'
"
${
file
}
"
sed
-i
's/^EthBlockFetchPeriod=.*/EthBlockFetchPeriod=500/g'
"
${
file
}
"
sed
-i
's/^fetchHeightPeriodMs=.*/fetchHeightPeriodMs=500/g'
"
${
file
}
"
sed
-i
's/^fetchHeightPeriodMs=.*/fetchHeightPeriodMs=500/g'
"
${
file
}
"
#sed -i 's/#BridgeRegistry=\"0x40BFE5eD039A9a2Eb42ece2E2CA431bFa7Cf4c42\"/BridgeRegistry=\"'${BridgeRegistry}'\"/g' "../build/relayer.toml"
#sed -i 's/192.168.64.2/'${chain33Host}'/g' "../build/relayer.toml"
#sed -i 's/192.168.3.156/'${pushHost}'/g' "../build/relayer.toml"
}
}
# 更新配置文件 $1 为 BridgeRegistry 合约地址; $2 等待区块 默认10; $3 relayer.toml 地址
# 更新配置文件 $1 为 BridgeRegistry 合约地址; $2 等待区块 默认10; $3 relayer.toml 地址
...
@@ -384,10 +380,6 @@ function updata_relayer_toml_ropston() {
...
@@ -384,10 +380,6 @@ function updata_relayer_toml_ropston() {
sed
-i
's/EthMaturityDegree=10/'
EthMaturityDegree
=
"
${
maturityDegree
}
"
'/g'
"
${
file
}
"
sed
-i
's/EthMaturityDegree=10/'
EthMaturityDegree
=
"
${
maturityDegree
}
"
'/g'
"
${
file
}
"
sed
-i
's/maturityDegree=10/'
maturityDegree
=
"
${
maturityDegree
}
"
'/g'
"
${
file
}
"
sed
-i
's/maturityDegree=10/'
maturityDegree
=
"
${
maturityDegree
}
"
'/g'
"
${
file
}
"
#sed -i 's/#BridgeRegistry=\"0x40BFE5eD039A9a2Eb42ece2E2CA431bFa7Cf4c42\"/BridgeRegistry=\"'${BridgeRegistry}'\"/g' "../build/relayer.toml"
#sed -i 's/192.168.64.2/'${chain33Host}'/g' "../build/relayer.toml"
#sed -i 's/192.168.3.156/'${pushHost}'/g' "../build/relayer.toml"
}
}
# 更新 B C D 的配置文件
# 更新 B C D 的配置文件
...
@@ -397,44 +389,6 @@ function updata_all_relayer_toml() {
...
@@ -397,44 +389,6 @@ function updata_all_relayer_toml() {
# local dockername=30
# local dockername=30
for
name
in
B C D
;
do
for
name
in
B C D
;
do
local
file
=
"../build/
$name
/relayer.toml"
cp
'../build/A/relayer.toml'
"
${
file
}
"
cp
'../build/ebrelayer'
"../build/
$name
/ebrelayer"
# 删除配置文件中不需要的字段
for
deleteName
in
"deployerPrivateKey"
"operatorAddr"
"validatorsAddr"
"initPowers"
"deployerPrivateKey"
"deploy"
;
do
delete_line
"
${
file
}
"
"
${
deleteName
}
"
done
# 替换端口
port
=
$((
port
+
1
))
sed
-i
's/localhost:9901/localhost:'
${
port
}
'/g'
"
${
file
}
"
port2
=
$((
port2
+
1
))
sed
-i
's/20000/'
${
port2
}
'/g'
"
${
file
}
"
sed
-i
's/x2ethereum/x2ethereum'
${
name
}
'/g'
"
${
file
}
"
# local chain33Host=$(docker inspect build_chain${dockername}_1 | jq ".[].NetworkSettings.Networks.build_default.IPAddress" | sed 's/\"//g')
# if [[ "${chain33Host}" == "" ]]; then
# echo -e "${RED}chain33Host is empty${NOC}"
# exit 1
# fi
# local line=$(delete_line_show ${file} "chain33Host")
# # 在第 line 行后面 新增合约地址
# sed -i ''${line}' a chain33Host="http://'${chain33Host}':8801"' "${file}"
#
# dockername=$((${dockername} + 1))
done
}
# 更新 B C D 的配置文件
function
updata_all_relayer_toml2
()
{
local
port
=
9901
local
port2
=
20000
# local dockername=30
for
name
in
B C D
;
do
local
file
=
"./
$name
/relayer.toml"
local
file
=
"./
$name
/relayer.toml"
cp
'./A/relayer.toml'
"
${
file
}
"
cp
'./A/relayer.toml'
"
${
file
}
"
cp
'./ebrelayer'
"./
$name
/ebrelayer"
cp
'./ebrelayer'
"./
$name
/ebrelayer"
...
@@ -452,17 +406,6 @@ function updata_all_relayer_toml2() {
...
@@ -452,17 +406,6 @@ function updata_all_relayer_toml2() {
sed
-i
's/20000/'
${
port2
}
'/g'
"
${
file
}
"
sed
-i
's/20000/'
${
port2
}
'/g'
"
${
file
}
"
sed
-i
's/x2ethereum/x2ethereum'
${
name
}
'/g'
"
${
file
}
"
sed
-i
's/x2ethereum/x2ethereum'
${
name
}
'/g'
"
${
file
}
"
# local chain33Host=$(docker inspect build_chain${dockername}_1 | jq ".[].NetworkSettings.Networks.build_default.IPAddress" | sed 's/\"//g')
# if [[ "${chain33Host}" == "" ]]; then
# echo -e "${RED}chain33Host is empty${NOC}"
# exit 1
# fi
# local line=$(delete_line_show ${file} "chain33Host")
# # 在第 line 行后面 新增合约地址
# sed -i ''${line}' a chain33Host="http://'${chain33Host}':8801"' "${file}"
#
# dockername=$((${dockername} + 1))
done
done
}
}
...
...
plugin/dapp/x2ethereum/cmd/test/test-rpc.sh
View file @
0d6978b5
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment