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
3bf8962b
Commit
3bf8962b
authored
Jun 05, 2019
by
linj
Committed by
vipwzw
Jun 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shellcheck
parent
757a5aa2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
17 deletions
+7
-17
test-rpc.sh
plugin/dapp/js/cmd/build/test-rpc.sh
+3
-0
test-rpc.sh
plugin/dapp/unfreeze/cmd/build/test-rpc.sh
+4
-17
No files found.
plugin/dapp/js/cmd/build/test-rpc.sh
View file @
3bf8962b
#!/usr/bin/env bash
# shellcheck disable=SC2128
# shellcheck source=/dev/null
source
../dapp-test-common.sh
MAIN_HTTP
=
""
function
init
()
{
ispara
=
$(
echo
'"'
"
${
MAIN_HTTP
}
"
'"'
| jq
'.|contains("8901")'
)
...
...
plugin/dapp/unfreeze/cmd/build/test-rpc.sh
View file @
3bf8962b
#!/usr/bin/env bash
# shellcheck disable=SC2128
# shellcheck source=/dev/null
source
../dapp-test-common.sh
MAIN_HTTP
=
""
function
block_wait
()
{
req
=
'{"method":"Chain33.GetLastHeader","params":[{}]}'
cur_height
=
$(
curl
-ksd
"
$req
"
${
MAIN_HTTP
}
| jq
".result.height"
)
expect
=
$((
cur_height
+
${
1
}))
local
count
=
0
while
true
;
do
new_height
=
$(
curl
-ksd
"
$req
"
${
MAIN_HTTP
}
| jq
".result.height"
)
if
[
"
${
new_height
}
"
-ge
"
${
expect
}
"
]
;
then
break
fi
count
=
$((
count
+
1
))
sleep
1
done
echo
"wait new block
$count
s, cur height=
$expect
,old=
$cur_height
"
}
txhash
=
""
function
query_unfreezeID
()
{
block_wait 1
chain33_BlockWait 1
"
$MAIN_HTTP
"
# echo "req=$req"
local times
=
10
...
...
@@ -99,6 +85,7 @@ function CreateRawUnfreezeWithdraw() {
rawtx=
$(
jq
-r
".result"
<<<
"
$resp
"
)
chain33_SignRawTx "
$rawtx
" "
${
beneficiary_key
}
" "
${
MAIN_HTTP
}
"
}
function CreateRawUnfreezeTerminate() {
req='{"
method
":"
unfreeze
.CreateRawUnfreezeTerminate
","
params
":[{"
unfreezeID
":"
'${uid}'
"}]}'
# echo "
#request
:
$req
"
...
...
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