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
f795f328
Commit
f795f328
authored
May 24, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rpc-test debug info
parent
fa6a6bf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
test-rpc.sh
plugin/dapp/pokerbull/cmd/build/test-rpc.sh
+6
-1
test-rpc.sh
plugin/dapp/retrieve/cmd/build/test-rpc.sh
+18
-0
No files found.
plugin/dapp/pokerbull/cmd/build/test-rpc.sh
View file @
f795f328
...
@@ -154,6 +154,7 @@ chain33_ImportPrivkey() {
...
@@ -154,6 +154,7 @@ chain33_ImportPrivkey() {
}
}
signrawtx
()
{
signrawtx
()
{
echo
"sign tx '
$1
' begin"
txHex
=
"
$1
"
txHex
=
"
$1
"
priKey
=
"
$2
"
priKey
=
"
$2
"
type
=
"
$3
"
type
=
"
$3
"
...
@@ -164,9 +165,11 @@ signrawtx() {
...
@@ -164,9 +165,11 @@ signrawtx() {
else
else
echo
"signedTx null error"
echo
"signedTx null error"
fi
fi
echo
"sign tx '
$1
' end"
}
}
sendTx
()
{
sendTx
()
{
echo
"send tx '
$1
' begin"
signedTx
=
$1
signedTx
=
$1
type
=
$2
type
=
$2
local
req
=
'"method":"Chain33.SendTransaction","params":[{"token":"BTY","data":"'
"
$signedTx
"
'"}]'
local
req
=
'"method":"Chain33.SendTransaction","params":[{"token":"BTY","data":"'
"
$signedTx
"
'"}]'
...
@@ -181,10 +184,11 @@ sendTx() {
...
@@ -181,10 +184,11 @@ sendTx() {
else
else
echo
"send tx error:
$err
"
echo
"send tx error:
$err
"
fi
fi
echo
"send tx '
$1
' end"
}
}
Chain33_SendToAddress
()
{
Chain33_SendToAddress
()
{
echo
"send '
$3
' from '
$1
' to '
$2
' begin"
local
from
=
"
$1
"
local
from
=
"
$1
"
local
to
=
"
$2
"
local
to
=
"
$2
"
local
amount
=
$3
local
amount
=
$3
...
@@ -195,6 +199,7 @@ Chain33_SendToAddress() {
...
@@ -195,6 +199,7 @@ Chain33_SendToAddress() {
echo_rst
"
$FUNCNAME
"
"
$?
"
echo_rst
"
$FUNCNAME
"
"
$?
"
hash
=
$(
jq
'(.result.hash)'
<<<
"
$resp
"
)
hash
=
$(
jq
'(.result.hash)'
<<<
"
$resp
"
)
echo
"hash=
$hash
"
echo
"hash=
$hash
"
echo
"send '
$3
' from '
$1
' to '
$2
' end"
}
}
init
()
{
init
()
{
...
...
plugin/dapp/retrieve/cmd/build/test-rpc.sh
View file @
f795f328
...
@@ -189,6 +189,23 @@ Chain33_SendToAddress() {
...
@@ -189,6 +189,23 @@ Chain33_SendToAddress() {
query_tx
"
$hash
"
query_tx
"
$hash
"
}
}
init
()
{
ispara
=
$(
echo
'"'
"
${
MAIN_HTTP
}
"
'"'
| jq
'.|contains("8901")'
)
echo
"ipara=
$ispara
"
if
[
"
$ispara
"
==
true
]
;
then
retrieve_addr
=
$(
curl
-ksd
'{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.retrieve"}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
else
chain33_ImportPrivkey
"
${
MAIN_HTTP
}
"
"0x9c451df9e5cb05b88b28729aeaaeb3169a2414097401fcb4c79c1971df734588"
"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
retrieve_addr
=
$(
curl
-ksd
'{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"retrieve"}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
fi
echo
"retrieveaddr=
$retrieve_addr
"
from
=
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
Chain33_SendToAddress
"
$from
"
"
$retrieve_addr
"
10000000000
block_wait 1
}
function
run_test
()
{
function
run_test
()
{
retrieve_Backup
"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
61
retrieve_Backup
"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
61
retrieve_QueryResult
"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
1
retrieve_QueryResult
"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY"
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
1
...
@@ -208,6 +225,7 @@ function main() {
...
@@ -208,6 +225,7 @@ function main() {
echo
"=========== # retrieve rpc test ============="
echo
"=========== # retrieve rpc test ============="
echo
"ip=
$MAIN_HTTP
"
echo
"ip=
$MAIN_HTTP
"
init
run_test
run_test
if
[
-n
"
$CASE_ERR
"
]
;
then
if
[
-n
"
$CASE_ERR
"
]
;
then
...
...
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