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
ddb29f2e
Commit
ddb29f2e
authored
May 14, 2019
by
liuyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify blackwhite rpc
parent
563677cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
23 deletions
+13
-23
build.sh
plugin/dapp/blackwhite/cmd/build.sh
+5
-9
test-rpc.sh
plugin/dapp/blackwhite/cmd/build/test-rpc.sh
+8
-14
No files found.
plugin/dapp/blackwhite/cmd/build.sh
View file @
ddb29f2e
#!/
usr/bin/env ba
sh
#!/
bin/
sh
strpwd
=
$(
pwd
)
strpwd
=
$(
pwd
)
strcmd
=
${
strpwd
##*dapp/
}
strcmd
=
${
strpwd
##*dapp/
}
strapp
=
${
strcmd
%/cmd*
}
strapp
=
${
strcmd
%/cmd*
}
OUT_DIR
=
"
${
1
}
/
$strapp
"
OUT_DIR
=
"
${
1
}
/
$strapp
"
OUT_TESTDIR
=
"
${
1
}
/dapptest/
$strapp
"
#FLAG=$2
PARACLI
=
"
${
OUT_DIR
}
/chain33-para-cli"
PARANAME
=
para
SRC_CLI
=
github.com/33cn/plugin/cli
go build
-v
-o
"
${
PARACLI
}
"
-ldflags
"-X
${
SRC_CLI
}
/buildflags.ParaName=user.p.
${
PARANAME
}
. -X
${
SRC_CLI
}
/buildflags.RPCAddr=http://localhost:8901"
"
${
SRC_CLI
}
"
mkdir
-p
"
${
OUT_DIR
}
"
# shellcheck disable=SC2086
cp
./build/
*
"
${
OUT_DIR
}
"
cp
./build/
*
"
${
OUT_DIR
}
"
OUT_TESTDIR
=
"
${
1
}
/dapptest/
$strapp
"
mkdir
-p
"
${
OUT_TESTDIR
}
"
mkdir
-p
"
${
OUT_TESTDIR
}
"
cp
./
test/
*
"
${
OUT_TESTDIR
}
"
cp
./
build/test-rpc.sh
"
${
OUT_TESTDIR
}
"
plugin/dapp/blackwhite/cmd/
test
/test-rpc.sh
→
plugin/dapp/blackwhite/cmd/
build
/test-rpc.sh
View file @
ddb29f2e
#!/usr/bin/env bash
#!/usr/bin/env bash
# shellcheck disable=SC2128
# shellcheck disable=SC2128
set
-e
set
-o
pipefail
MAIN_HTTP
=
""
MAIN_HTTP
=
""
PARA_HTTP
=
""
PARA_HTTP
=
""
...
@@ -188,11 +190,11 @@ function run_testcases() {
...
@@ -188,11 +190,11 @@ function run_testcases() {
#white2="OiexKDzIlS1CKr3KBNWEY1k5uXzDI/ou6Dd+x0ByQCM="
#white2="OiexKDzIlS1CKr3KBNWEY1k5uXzDI/ou6Dd+x0ByQCM="
#先创建账户地址
#先创建账户地址
chain33_NewAccount
"label18
9
"
chain33_NewAccount
"label18
8
"
gameAddr1
=
"
${
glAddr
}
"
gameAddr1
=
"
${
glAddr
}
"
chain33_NewAccount
"label28
9
"
chain33_NewAccount
"label28
8
"
gameAddr2
=
"
${
glAddr
}
"
gameAddr2
=
"
${
glAddr
}
"
chain33_NewAccount
"label38
9
"
chain33_NewAccount
"label38
8
"
gameAddr3
=
"
${
glAddr
}
"
gameAddr3
=
"
${
glAddr
}
"
#给每个账户分别转帐
#给每个账户分别转帐
...
@@ -231,7 +233,7 @@ function run_testcases() {
...
@@ -231,7 +233,7 @@ function run_testcases() {
}
}
function
paracross_rpc_test
()
{
function
main
()
{
local
ip
=
$1
local
ip
=
$1
MAIN_HTTP
=
"http://
$ip
:8801"
MAIN_HTTP
=
"http://
$ip
:8801"
PARA_HTTP
=
"http://
$ip
:8901"
PARA_HTTP
=
"http://
$ip
:8901"
...
@@ -247,12 +249,4 @@ function paracross_rpc_test() {
...
@@ -247,12 +249,4 @@ function paracross_rpc_test() {
fi
fi
}
}
paracross_rpc_test 172.19.0.6
main
"172.19.0.6"
\ No newline at end of file
#UNIT_HTTP="http://172.19.0.6:8801"
#blackwhite_GetBlackwhiteRoundInfo "0xb7b61ea3412d528b956c91df76c26bb8e3adcb7ffce11b0a1008bb7d0f52d729"
#blackwhite_GetBlackwhiteByStatusAndAddr "0xb7b61ea3412d528b956c91df76c26bb8e3adcb7ffce11b0a1008bb7d0f52d729" "18Y87cw2hiYC71bvpD872oYMYXtw66Qp6o"
#blackwhite_GetBlackwhiteloopResult "0xb7b61ea3412d528b956c91df76c26bb8e3adcb7ffce11b0a1008bb7d0f52d729"
#blackwhite_BlackwhiteTimeoutDoneTx "0xb7b61ea3412d528b956c91df76c26bb8e3adcb7ffce11b0a1008bb7d0f52d729"
\ No newline at end of file
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