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
ea4ebe89
Commit
ea4ebe89
authored
Jun 22, 2019
by
yukang
Browse files
Options
Browse Files
Download
Plain Diff
optimize para rpc test case
parents
fdd6f88c
8e527be5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
test-rpc.sh
plugin/dapp/paracross/cmd/test/test-rpc.sh
+1
-7
No files found.
plugin/dapp/paracross/cmd/test/test-rpc.sh
View file @
ea4ebe89
...
@@ -7,7 +7,6 @@ UNIT_HTTP=""
...
@@ -7,7 +7,6 @@ UNIT_HTTP=""
# shellcheck source=/dev/null
# shellcheck source=/dev/null
source
../dapp-test-common.sh
source
../dapp-test-common.sh
paracross_GetBlock2MainInfo
()
{
paracross_GetBlock2MainInfo
()
{
local
height
local
height
...
@@ -41,7 +40,7 @@ function paracross_SignAndSend() {
...
@@ -41,7 +40,7 @@ function paracross_SignAndSend() {
signedTx
=
$(
curl
-ksd
'{"method":"Chain33.SignRawTx","params":[{"expire":"120s","fee":'
"
$1
"
',"privkey":"'
"
$2
"
'","txHex":"'
"
$3
"
'"}]}'
${
UNIT_HTTP
}
| jq
-r
".result"
)
signedTx
=
$(
curl
-ksd
'{"method":"Chain33.SignRawTx","params":[{"expire":"120s","fee":'
"
$1
"
',"privkey":"'
"
$2
"
'","txHex":"'
"
$3
"
'"}]}'
${
UNIT_HTTP
}
| jq
-r
".result"
)
#echo "signedTx:$signedTx"
#echo "signedTx:$signedTx"
sendedTx
=
$(
curl
-ksd
'{"method":"Chain33.SendTransaction","params":[{"data":"'
"
$signedTx
"
'"}]}'
${
UNIT_HTTP
}
| jq
-r
".result"
)
sendedTx
=
$(
curl
-ksd
'{"method":"Chain33.SendTransaction","params":[{"data":"'
"
$signedTx
"
'"}]}'
${
UNIT_HTTP
}
| jq
-r
".result"
)
echo
"sendedTx:
$sendedTx
"
echo
"sendedTx:
$sendedTx
"
}
}
...
@@ -57,7 +56,6 @@ function paracross_QueryBalance() {
...
@@ -57,7 +56,6 @@ function paracross_QueryBalance() {
return
$?
return
$?
}
}
function
paracross_Transfer_Withdraw
()
{
function
paracross_Transfer_Withdraw
()
{
# 计数器,资产转移操作和取钱操作都成功才算成功,也就是 counter == 2
# 计数器,资产转移操作和取钱操作都成功才算成功,也就是 counter == 2
...
@@ -105,7 +103,6 @@ function paracross_Transfer_Withdraw() {
...
@@ -105,7 +103,6 @@ function paracross_Transfer_Withdraw() {
chain33_SignRawTx
"
$tx_hash
"
"
$privkey
"
${
UNIT_HTTP
}
chain33_SignRawTx
"
$tx_hash
"
"
$privkey
"
${
UNIT_HTTP
}
#paracross_SignAndSend $fee "$privkey" "$tx_hash"
#paracross_SignAndSend $fee "$privkey" "$tx_hash"
#4 查询转移后余额状态
#4 查询转移后余额状态
local times
=
100
local times
=
100
while
true
;
do
while
true
;
do
...
@@ -134,7 +131,6 @@ function paracross_Transfer_Withdraw() {
...
@@ -134,7 +131,6 @@ function paracross_Transfer_Withdraw() {
chain33_SignRawTx
"
$tx_hash
"
"
$privkey
"
${
UNIT_HTTP
}
chain33_SignRawTx
"
$tx_hash
"
"
$privkey
"
${
UNIT_HTTP
}
#paracross_SignAndSend $fee "$privkey" "$tx_hash"
#paracross_SignAndSend $fee "$privkey" "$tx_hash"
#6 查询取钱后余额状态
#6 查询取钱后余额状态
local times
=
100
local times
=
100
while
true
;
do
while
true
;
do
...
@@ -157,7 +153,6 @@ function paracross_Transfer_Withdraw() {
...
@@ -157,7 +153,6 @@ function paracross_Transfer_Withdraw() {
fi
fi
done
done
[
"
$count
"
-eq
2
]
[
"
$count
"
-eq
2
]
local
rst
=
$?
local
rst
=
$?
echo_rst
"
$FUNCNAME
"
"
$rst
"
echo_rst
"
$FUNCNAME
"
"
$rst
"
...
@@ -266,7 +261,6 @@ function run_testcases() {
...
@@ -266,7 +261,6 @@ function run_testcases() {
fi
fi
}
}
function
main
()
{
function
main
()
{
UNIT_HTTP
=
$1
UNIT_HTTP
=
$1
echo
"=========== # paracross rpc test ============="
echo
"=========== # paracross rpc test ============="
...
...
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