Commit 111fa51a authored by pengjun's avatar pengjun

Merge remote-tracking branch 'upstream/master'

parents 5b9088ef 3852934c
...@@ -20,8 +20,6 @@ require ( ...@@ -20,8 +20,6 @@ require (
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/protobuf v1.3.2 github.com/golang/protobuf v1.3.2
github.com/hashicorp/golang-lru v0.5.0 github.com/hashicorp/golang-lru v0.5.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/pkg/errors v0.8.0 github.com/pkg/errors v0.8.0
github.com/prometheus/client_golang v1.1.0 // indirect github.com/prometheus/client_golang v1.1.0 // indirect
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
......
...@@ -17,24 +17,6 @@ paracross_GetBlock2MainInfo() { ...@@ -17,24 +17,6 @@ paracross_GetBlock2MainInfo() {
echo_rst "$FUNCNAME" "$rst" echo_rst "$FUNCNAME" "$rst"
} }
chain33_lock() {
local ok
ok=$(curl -ksd '{"method":"Chain33.Lock","params":[]}' ${UNIT_HTTP} | jq -r ".result.isOK")
[ "$ok" == true ]
local rst=$?
echo_rst "$FUNCNAME" "$rst"
}
chain33_unlock() {
local ok
ok=$(curl -ksd '{"method":"Chain33.UnLock","params":[{"passwd":"1314fuzamei","timeout":0}]}' ${UNIT_HTTP} | jq -r ".result.isOK")
[ "$ok" == true ]
local rst=$?
echo_rst "$FUNCNAME" "$rst"
}
function paracross_SignAndSend() { function paracross_SignAndSend() {
local signedTx local signedTx
local sendedTx local sendedTx
...@@ -54,8 +36,9 @@ function paracross_QueryParaBalance() { ...@@ -54,8 +36,9 @@ function paracross_QueryParaBalance() {
ip_http=${UNIT_HTTP%:*} ip_http=${UNIT_HTTP%:*}
para_http="$ip_http:8901" para_http="$ip_http:8901"
local exec=$2
req='{"method":"Chain33.GetBalance", "params":[{"addresses" : ["'"$1"'"], "execer" : "paracross","asset_exec":"paracross","asset_symbol":"coins.bty"}]}' req='{"method":"Chain33.GetBalance", "params":[{"addresses" : ["'"$1"'"], "execer" : "'"${exec}"'","asset_exec":"paracross","asset_symbol":"coins.bty"}]}'
resp=$(curl -ksd "$req" "${para_http}") resp=$(curl -ksd "$req" "${para_http}")
balance=$(jq -r '.result[0].balance' <<<"$resp") balance=$(jq -r '.result[0].balance' <<<"$resp")
echo "$balance" echo "$balance"
...@@ -130,7 +113,7 @@ function paracross_Transfer_Withdraw_Inner() { ...@@ -130,7 +113,7 @@ function paracross_Transfer_Withdraw_Inner() {
#paracross_SignAndSend $fee "$privkey" "$tx_hash" #paracross_SignAndSend $fee "$privkey" "$tx_hash"
#1. 查询资产转移前余额状态 #1. 查询资产转移前余额状态
para_balance_before=$(paracross_QueryParaBalance "$from_addr") para_balance_before=$(paracross_QueryParaBalance "$from_addr" "paracross")
echo "para before transferring:$para_balance_before" echo "para before transferring:$para_balance_before"
main_balance_before=$(paracross_QueryMainBalance "$from_addr") main_balance_before=$(paracross_QueryMainBalance "$from_addr")
echo "main before transferring:$main_balance_before" echo "main before transferring:$main_balance_before"
...@@ -144,7 +127,7 @@ function paracross_Transfer_Withdraw_Inner() { ...@@ -144,7 +127,7 @@ function paracross_Transfer_Withdraw_Inner() {
#4 查询转移后余额状态 #4 查询转移后余额状态
local times=100 local times=100
while true; do while true; do
para_balance_after=$(paracross_QueryParaBalance "$from_addr") para_balance_after=$(paracross_QueryParaBalance "$from_addr" "paracross")
echo "para after transferring:$para_balance_after" echo "para after transferring:$para_balance_after"
main_balance_after=$(paracross_QueryMainBalance "$from_addr") main_balance_after=$(paracross_QueryMainBalance "$from_addr")
echo "main after transferring:$main_balance_after" echo "main after transferring:$main_balance_after"
...@@ -175,7 +158,7 @@ function paracross_Transfer_Withdraw_Inner() { ...@@ -175,7 +158,7 @@ function paracross_Transfer_Withdraw_Inner() {
#6 查询取钱后余额状态 #6 查询取钱后余额状态
local times=100 local times=100
while true; do while true; do
para_balance_withdraw_after=$(paracross_QueryParaBalance "$from_addr") para_balance_withdraw_after=$(paracross_QueryParaBalance "$from_addr" "paracross")
echo "para after withdrawing :$para_balance_withdraw_after" echo "para after withdrawing :$para_balance_withdraw_after"
main_balance_withdraw_after=$(paracross_QueryMainBalance "$from_addr") main_balance_withdraw_after=$(paracross_QueryMainBalance "$from_addr")
echo "main after withdrawing :$main_balance_withdraw_after" echo "main after withdrawing :$main_balance_withdraw_after"
...@@ -306,9 +289,76 @@ function paracross_ListNodeStatus() { ...@@ -306,9 +289,76 @@ function paracross_ListNodeStatus() {
echo_rst "$FUNCNAME" "$rst" echo_rst "$FUNCNAME" "$rst"
} }
function paracross_testTxGroup() {
local para_ip=$1
ispara=$(echo '"'"${para_ip}"'"' | jq '.|contains("8901")')
echo "ipara=$ispara"
local paracross_addr=""
local main_ip=${para_ip//8901/8801}
paracross_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"paracross"}]}' "${main_ip}" | jq -r ".result")
echo "paracross_addr=$paracross_addr"
#main chain import pri key
local test_addr="1MAuE8QSbbech3bVKK2JPJJxYxNtT95oSU"
local test_prikey="0x24d1fad138be98eebee31440f144aa38c404533f40862995282162bc538e91c8"
#execer
local paracross_execer_name="user.p.para.paracross"
local trade_exec_name="user.p.para.trade"
local trade_exec_addr="12bihjzbaYWjcpDiiy9SuAWeqNksQdiN13"
local amount_trade=100000000
local amount_transfer=800000000
chain33_ImportPrivkey "${test_prikey}" "${test_addr}" "paracross-transfer6" "${main_ip}"
# tx fee + transfer 10 coins
chain33_applyCoins "${test_addr}" 1000000000 "${main_ip}"
chain33_QueryBalance "${test_addr}" "$main_ip"
#deposit 8 coins to paracross
chain33_SendToAddress "${test_addr}" "$paracross_addr" "$amount_transfer" "${main_ip}"
chain33_QueryExecBalance "${test_addr}" "paracross" "${main_ip}"
# 资产从主链转移到平行链
tx_hash_asset=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"'"${paracross_execer_name}"'","actionName":"ParacrossAssetTransfer","payload":{"execName":"'"${paracross_execer_name}"'","to":"'"$test_addr"'","amount":'${amount_transfer}'}}]}' "${para_ip}" | jq -r ".result")
#curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"user.p.para.paracross","actionName":"ParacrossAssetTransfer","payload":{"execName":"user.p.para.paracross","to":"1MAuE8QSbbech3bVKK2JPJJxYxNtT95oSU","amount":100000000}}]}' http://172.20.0.5:8901
# 资产从平行链转移到平行链合约
tx_hash_transferExec=$(curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"'"${paracross_execer_name}"'","actionName":"TransferToExec","payload":{"execName":"'"${paracross_execer_name}"'","to":"'"${trade_exec_addr}"'","amount":'${amount_trade}', "cointoken":"coins.bty"}}]}' "${para_ip}" | jq -r ".result")
#curl -ksd '{"method":"Chain33.CreateTransaction","params":[{"execer":"user.p.para.paracross","actionName":"TransferToExec","payload":{"execName":"user.p.para.paracross","to":"12bihjzbaYWjcpDiiy9SuAWeqNksQdiN13","amount":10000000, "cointoken":"coins.bty"}}]}' http://172.20.0.5:8901
#create tx group with none
tx_hash_group=$(curl -ksd '{"method":"Chain33.CreateNoBlanaceTxs","params":[{"txHexs":["'"${tx_hash_asset}"'","'"${tx_hash_transferExec}"'"],"privkey":"'"${test_prikey}"'","expire":"120"}]}' "${para_ip}" | jq -r ".result")
#curl -ksd '{"method":"Chain33.CreateNoBlanaceTxs","params":[{"txHexs":["0a15757365722e702e706172612e7061726163726f7373122e10904e22291080c2d72f2222314d41754538515362626563683362564b4b324a504a4a7859784e745439356f535520a08d0630d195faf7d3a1ec9a4c3a223139574a4a7639366e4b4155347348465771476d7371666a786433376a617a716969","0a15757365722e702e706172612e7061726163726f7373124f1004424b0a09636f696e732e6274791080ade2042215757365722e702e706172612e7061726163726f73732a2231326269686a7a626159576a637044696979395375415765714e6b735164694e313320a08d0630a8c984ebb2bb90a5613a223139574a4a7639366e4b4155347348465771476d7371666a786433376a617a716969"],"privkey":"4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01","expire":"120"}]}' http://172.20.0.5:8901
#sign 1
tx_sign=$(curl -ksd '{"method":"Chain33.SignRawTx","params":[{"privkey":"'"$test_prikey"'","txHex":"'"$tx_hash_group"'","index":2,"expire":"120s"}]}' "${para_ip}" | jq -r ".result")
#curl -ksd '{"method":"Chain33.SignRawTx","params":[{"privkey":"0x24d1fad138be98eebee31440f144aa38c404533f40862995282162bc538e91c8","txHex":"0a10757365722e702e706172612e6e6f6e6512126e6f2d6665652d7472616e73616374696f6e1a6e080112210320bbac09528e19c55b0f89cb37ab265e7e856b1a8c388780322dbbfd194b52ba1a473045022100fe7763b2fa5b42eddccf1a3434cb6d6bb60a5c5c32e5498219e99be01bb94ad302201ecb9931a2bb4e1b0d49ec50ee552a774c1db8a1eb9b2dff47e4b931625e3af220e0a71230a89780b2a5b187990a3a2231466a58697076505142754e6f7a4133506150724b6846703854343166717141707640034a8c050a8e020a10757365722e702e706172612e6e6f6e6512126e6f2d6665652d7472616e73616374696f6e1a6e080112210320bbac09528e19c55b0f89cb37ab265e7e856b1a8c388780322dbbfd194b52ba1a473045022100fe7763b2fa5b42eddccf1a3434cb6d6bb60a5c5c32e5498219e99be01bb94ad302201ecb9931a2bb4e1b0d49ec50ee552a774c1db8a1eb9b2dff47e4b931625e3af220e0a71230a89780b2a5b187990a3a2231466a58697076505142754e6f7a4133506150724b6846703854343166717141707640034a2054ba4451fb8f226dd54b52ec086f4eaa4990d66876899b1badec8ce96ef55208522000f2e5970b5b1854da143f4f3e91bf7eb87d1d62869ef08a2ce3b109994ec3650abb010a15757365722e702e706172612e7061726163726f7373122e10904e22291080c2d72f2222314d41754538515362626563683362564b4b324a504a4a7859784e745439356f535530d195faf7d3a1ec9a4c3a223139574a4a7639366e4b4155347348465771476d7371666a786433376a617a71696940034a2054ba4451fb8f226dd54b52ec086f4eaa4990d66876899b1badec8ce96ef5520852208fb7939bf2701e5af9cef05da33020be682e10c84fde9bd8d24765031fad530b0aba010a15757365722e702e706172612e7061726163726f7373124f1004424b0a09636f696e732e6274791080ade2042215757365722e702e706172612e7061726163726f73732a2231326269686a7a626159576a637044696979395375415765714e6b735164694e313330a8c984ebb2bb90a5613a223139574a4a7639366e4b4155347348465771476d7371666a786433376a617a71696940034a2054ba4451fb8f226dd54b52ec086f4eaa4990d66876899b1badec8ce96ef55208522000f2e5970b5b1854da143f4f3e91bf7eb87d1d62869ef08a2ce3b109994ec365","index":2,"expire":"120s"}]}' http://172.20.0.5:8901
#sign 2
tx_sign2=$(curl -ksd '{"method":"Chain33.SignRawTx","params":[{"privkey":"'"$test_prikey"'","txHex":"'"$tx_sign"'","index":3,"expire":"120s"}]}' "${para_ip}" | jq -r ".result")
#curl -ksd '{"method":"Chain33.SignRawTx","params":[{"privkey":"0x24d1fad138be98eebee31440f144aa38c404533f40862995282162bc538e91c8","txHex":"0a10757365722e702e706172612e6e6f6e6512126e6f2d6665652d7472616e73616374696f6e1a6e080112210320bbac09528e19c55b0f89cb37ab265e7e856b1a8c388780322dbbfd194b52ba1a473045022100fe7763b2fa5b42eddccf1a3434cb6d6bb60a5c5c32e5498219e99be01bb94ad302201ecb9931a2bb4e1b0d49ec50ee552a774c1db8a1eb9b2dff47e4b931625e3af220e0a71230a89780b2a5b187990a3a2231466a58697076505142754e6f7a4133506150724b6846703854343166717141707640034afc050a8e020a10757365722e702e706172612e6e6f6e6512126e6f2d6665652d7472616e73616374696f6e1a6e080112210320bbac09528e19c55b0f89cb37ab265e7e856b1a8c388780322dbbfd194b52ba1a473045022100fe7763b2fa5b42eddccf1a3434cb6d6bb60a5c5c32e5498219e99be01bb94ad302201ecb9931a2bb4e1b0d49ec50ee552a774c1db8a1eb9b2dff47e4b931625e3af220e0a71230a89780b2a5b187990a3a2231466a58697076505142754e6f7a4133506150724b6846703854343166717141707640034a2054ba4451fb8f226dd54b52ec086f4eaa4990d66876899b1badec8ce96ef55208522000f2e5970b5b1854da143f4f3e91bf7eb87d1d62869ef08a2ce3b109994ec3650aab020a15757365722e702e706172612e7061726163726f7373122e10904e22291080c2d72f2222314d41754538515362626563683362564b4b324a504a4a7859784e745439356f53551a6e0801122103589ebf581958aeb8a72ff517f823c878aee16139ecbf0001a4611e9c004fecdf1a473045022100da5ad2bdc6e1e43a01d32c44f116e5d0bf96aa4c16debad49381ea5d11a49835022055a510460df9b63f8f585393d6603abf1388fac0e122b53ef3533f242287915730d195faf7d3a1ec9a4c3a223139574a4a7639366e4b4155347348465771476d7371666a786433376a617a71696940034a2054ba4451fb8f226dd54b52ec086f4eaa4990d66876899b1badec8ce96ef5520852208fb7939bf2701e5af9cef05da33020be682e10c84fde9bd8d24765031fad530b0aba010a15757365722e702e706172612e7061726163726f7373124f1004424b0a09636f696e732e6274791080ade2042215757365722e702e706172612e7061726163726f73732a2231326269686a7a626159576a637044696979395375415765714e6b735164694e313330a8c984ebb2bb90a5613a223139574a4a7639366e4b4155347348465771476d7371666a786433376a617a71696940034a2054ba4451fb8f226dd54b52ec086f4eaa4990d66876899b1badec8ce96ef55208522000f2e5970b5b1854da143f4f3e91bf7eb87d1d62869ef08a2ce3b109994ec365","index":3,"expire":"120s"}]}' http://172.20.0.5:8901
#send
chain33_SendTx "${tx_sign2}" "${para_ip}"
#tx_rst=$(curl -ksd '{"method":"Chain33.SendTransaction","params":[{"token":"BTY","data":"${tx_sign2}"}]'} "${para_ip}" | jq -r ".result" )
local transfer_expect="700000000"
local exec_expect="100000000"
transfer_val=$(paracross_QueryParaBalance "${test_addr}" "$paracross_execer_name")
transfer_exec_val=$(paracross_QueryParaBalance "${test_addr}" "$trade_exec_name")
if [ "${transfer_val}" != $transfer_expect ]; then
echo "paracross_testTxGroup trasfer failed, get=$transfer_val,expec=$transfer_expect"
exit 1
fi
if [ "${transfer_exec_val}" != $exec_expect ]; then
echo "paracross_testTxGroup toexec failed, get=$transfer_exec_val,expec=$exec_expect"
exit 1
fi
echo_rst "$FUNCNAME" 0
}
function run_testcases() { function run_testcases() {
chain33_lock
chain33_unlock
paracross_GetBlock2MainInfo paracross_GetBlock2MainInfo
paracross_IsSync paracross_IsSync
paracross_GetHeight paracross_GetHeight
...@@ -318,6 +368,7 @@ function run_testcases() { ...@@ -318,6 +368,7 @@ function run_testcases() {
paracross_ListNodeGroupStatus paracross_ListNodeGroupStatus
paracross_ListNodeStatus paracross_ListNodeStatus
paracross_Transfer_Withdraw paracross_Transfer_Withdraw
paracross_testTxGroup "$UNIT_HTTP"
} }
function main() { function main() {
...@@ -353,6 +404,6 @@ function main() { ...@@ -353,6 +404,6 @@ function main() {
fi fi
} }
main "$1" "$2" "$3" "$4" chain33_debug_function main "$1" "$2" "$3" "$4"
#main http://127.0.0.1:8801 #main http://127.0.0.1:8801
#main http://47.98.253.127:8801 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b user.p.fzmtest.paracross #main http://47.98.253.127:8801 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b user.p.fzmtest.paracross
...@@ -8,20 +8,72 @@ MAIN_HTTP="" ...@@ -8,20 +8,72 @@ MAIN_HTTP=""
# shellcheck source=/dev/null # shellcheck source=/dev/null
source ../dapp-test-common.sh source ../dapp-test-common.sh
# TODO
# 1. 合约测试的先后顺序 是否可以在指定合约之后测试
# 2. 或将资产类的合约先测试
# 3. 或资产类的合约提供创建的函数 创建一个某某名字的token
function updateConfig() {
unsignedTx=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"Chain33.CreateTransaction","params":[{"execer": "manage","actionName":"Modify","payload":{ "key": "token-blacklist","value": "BTY","op": "add","addr": ""}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result")
if [ "${unsignedTx}" == "" ]; then
echo_rst "update config create tx" 1
return
fi
chain33_SignRawTx "${unsignedTx}" "0x4257d8692ef7fe13c68b65d6a52f03933db2fa5ce8faf210b5b8b80c721ced01" "${MAIN_HTTP}"
}
function token_preCreate() {
unsignedTx=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"token.CreateRawTokenPreCreateTx","params":[{"name": "yinhebib", "symbol": "'"$1"'", "total": 1000000000000, "price": 0, "category": 1,"owner":"'"$2"'"}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result")
if [ "${unsignedTx}" == "" ]; then
echo_rst "token preCreate create tx" 1
return
fi
chain33_SignRawTx "${unsignedTx}" "0x4257d8692ef7fe13c68b65d6a52f03933db2fa5ce8faf210b5b8b80c721ced01" "${MAIN_HTTP}"
}
function token_finish() {
unsignedTx=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"token.CreateRawTokenFinishTx","params":[{"symbol": "'"$1"'", "owner":"'"$2"'"}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result")
if [ "${unsignedTx}" == "" ]; then
echo_rst "token finish create tx" 1
return
fi
chain33_SignRawTx "${unsignedTx}" "0x4257d8692ef7fe13c68b65d6a52f03933db2fa5ce8faf210b5b8b80c721ced01" "${MAIN_HTTP}"
}
function token_sendExec() {
unsignedTx=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"Chain33.CreateTransaction","params":[{"execer": "'"${token_ame}"'","actionName":"TransferToExec","payload": {"cointoken":"'"$1"'", "amount": "10000000000", "note": "", "to": "'"${retrieve_addr}"'", "execName": "'"${retrieve_name}"'"}}]}' -H 'content-type:text/plain;' ${MAIN_HTTP} | jq -r ".result")
if [ "${unsignedTx}" == "" ]; then
echo_rst "token sendExec create tx" 1
return
fi
chain33_SignRawTx "${unsignedTx}" "$3" "${MAIN_HTTP}"
}
function createToken() {
# symbol owner owner_key
updateConfig
token_preCreate "$1" "$2"
token_finish "$1" "$2"
token_sendExec "$1" "$2" "$3"
}
retrieve_Backup() { retrieve_Backup() {
echo "========== # retrieve backup begin ==========" echo "========== # retrieve backup begin =========="
local req='"method":"retrieve.CreateRawRetrieveBackupTx","params":[{"backupAddr":"13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx","defaultAddr":"1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL","delayPeriod": 61}]' local req='{"method":"retrieve.CreateRawRetrieveBackupTx","params":[{"backupAddr":"'$retrieve1'","defaultAddr":"'$retrieve2'","delayPeriod": 61}]}'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result") tx=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]' local reqDecode='{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]") data=$(curl -ksd "$reqDecode" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data") ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "0x3665fa66d1a17d2fc319a45250c8c8b9302ae0c393c2e39f2ef3b2f6bc40a42d" ${MAIN_HTTP} chain33_SignRawTx "$tx" "$retrieve2_key" ${MAIN_HTTP}
echo "========== # retrieve backup end ==========" echo "========== # retrieve backup end =========="
chain33_BlockWait 1 "${MAIN_HTTP}" chain33_BlockWait 1 "${MAIN_HTTP}"
...@@ -30,17 +82,17 @@ retrieve_Backup() { ...@@ -30,17 +82,17 @@ retrieve_Backup() {
retrieve_Prepare() { retrieve_Prepare() {
echo "========== # retrieve prepare begin ==========" echo "========== # retrieve prepare begin =========="
local req='"method":"retrieve.CreateRawRetrievePrepareTx","params":[{"backupAddr":"13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx","defaultAddr":"1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL"}]' local req='{"method":"retrieve.CreateRawRetrievePrepareTx","params":[{"backupAddr":"'$retrieve1'","defaultAddr":"'$retrieve2'"}]}'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result") tx=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]' local reqDecode='{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]") data=$(curl -ksd "$reqDecode" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data") ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "0xed8a078ee44eac473bd1d5c971e231c255badf7f0c2fbdbe31ef34669c441d6f" ${MAIN_HTTP} chain33_SignRawTx "$tx" "$retrieve1_key" ${MAIN_HTTP}
echo "========== # retrieve prepare end ==========" echo "========== # retrieve prepare end =========="
chain33_BlockWait 1 "${MAIN_HTTP}" chain33_BlockWait 1 "${MAIN_HTTP}"
...@@ -49,17 +101,36 @@ retrieve_Prepare() { ...@@ -49,17 +101,36 @@ retrieve_Prepare() {
retrieve_Perform() { retrieve_Perform() {
echo "========== # retrieve perform begin ==========" echo "========== # retrieve perform begin =========="
local req='"method":"retrieve.CreateRawRetrievePerformTx","params":[{"backupAddr":"13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx","defaultAddr":"1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL"}]' local req='{"method":"retrieve.CreateRawRetrievePerformTx","params":[{"backupAddr":"'$retrieve1'","defaultAddr":"'$retrieve2'"}]}'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result") tx=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]' local reqDecode='{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]") data=$(curl -ksd "$reqDecode" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data") ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "0xed8a078ee44eac473bd1d5c971e231c255badf7f0c2fbdbe31ef34669c441d6f" ${MAIN_HTTP} chain33_SignRawTx "$tx" "$retrieve1_key" ${MAIN_HTTP}
echo "========== # retrieve perform end =========="
chain33_BlockWait 1 "${MAIN_HTTP}"
}
retrieve_Perform_Token() {
echo "========== # retrieve perform begin =========="
local req='{"method":"retrieve.CreateRawRetrievePerformTx","params":[{"backupAddr":"'$retrieve1'","defaultAddr":"'$retrieve2'","assets": [{"exec":"token","symbol":"'"$symbol"'"}] }]}'
tx=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}'
data=$(curl -ksd "$reqDecode" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "$retrieve1_key" ${MAIN_HTTP}
echo "========== # retrieve perform end ==========" echo "========== # retrieve perform end =========="
chain33_BlockWait 1 "${MAIN_HTTP}" chain33_BlockWait 1 "${MAIN_HTTP}"
...@@ -68,17 +139,17 @@ retrieve_Perform() { ...@@ -68,17 +139,17 @@ retrieve_Perform() {
retrieve_Cancel() { retrieve_Cancel() {
echo "========== # retrieve cancel begin ==========" echo "========== # retrieve cancel begin =========="
local req='"method":"retrieve.CreateRawRetrieveCancelTx","params":[{"backupAddr":"13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx","defaultAddr":"1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL"}]' local req='{"method":"retrieve.CreateRawRetrieveCancelTx","params":[{"backupAddr":"'$retrieve1'","defaultAddr":"'$retrieve2'"}]}'
tx=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result") tx=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
local reqDecode='"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]' local reqDecode='{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'"$tx"'"}]}'
data=$(curl -ksd "{$reqDecode}" ${MAIN_HTTP} | jq -r ".result.txs[0]") data=$(curl -ksd "$reqDecode" ${MAIN_HTTP} | jq -r ".result.txs[0]")
ok=$(jq '(.execer != "")' <<<"$data") ok=$(jq '(.execer != "")' <<<"$data")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
chain33_SignRawTx "$tx" "0x3665fa66d1a17d2fc319a45250c8c8b9302ae0c393c2e39f2ef3b2f6bc40a42d" ${MAIN_HTTP} chain33_SignRawTx "$tx" "$retrieve2_key" ${MAIN_HTTP}
echo "========== # retrieve cancel end ==========" echo "========== # retrieve cancel end =========="
chain33_BlockWait 1 "${MAIN_HTTP}" chain33_BlockWait 1 "${MAIN_HTTP}"
...@@ -89,8 +160,22 @@ retrieve_QueryResult() { ...@@ -89,8 +160,22 @@ retrieve_QueryResult() {
local status=$1 local status=$1
local req='"method":"Chain33.Query","params":[{"execer":"retrieve","funcName":"GetRetrieveInfo","payload":{"backupAddress":"13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx", "defaultAddress":"1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL"}}]' local req='{"method":"Chain33.Query","params":[{"execer":"retrieve","funcName":"GetRetrieveInfo","payload":{"backupAddress":"'$retrieve1'", "defaultAddress":"'$retrieve2'"}}]}'
data=$(curl -ksd "{$req}" ${MAIN_HTTP} | jq -r ".result") data=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
ok=$(jq '(.status == '"$status"')' <<<"$data")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
echo "========== # retrieve query result end =========="
}
retrieve_QueryAssetResult() {
echo "========== # retrieve query result begin =========="
local status=$1
local req='{"method":"Chain33.Query","params":[{"execer":"retrieve","funcName":"GetRetrieveInfo","payload":{"backupAddress":"'$retrieve1'", "defaultAddress":"'$retrieve2'","assetExec":"token", "assetSymbol":"'"$symbol"'"}}]}'
data=$(curl -ksd "$req" ${MAIN_HTTP} | jq -r ".result")
ok=$(jq '(.status == '"$status"')' <<<"$data") ok=$(jq '(.status == '"$status"')' <<<"$data")
[ "$ok" == true ] [ "$ok" == true ]
...@@ -102,50 +187,36 @@ init() { ...@@ -102,50 +187,36 @@ init() {
ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")') ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")')
echo "ipara=$ispara" echo "ipara=$ispara"
if [ "$ispara" == true ]; then if [ "$ispara" == true ]; then
token_ame="user.p.para.token"
retrieve_name="user.p.para.retrieve"
retrieve_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.retrieve"}]}' ${MAIN_HTTP} | jq -r ".result") retrieve_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"user.p.para.retrieve"}]}' ${MAIN_HTTP} | jq -r ".result")
else else
token_ame="token"
retrieve_name="retrieve"
retrieve_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"retrieve"}]}' ${MAIN_HTTP} | jq -r ".result") retrieve_addr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"retrieve"}]}' ${MAIN_HTTP} | jq -r ".result")
fi fi
local main_ip=${MAIN_HTTP//8901/8801} retrieve1_key=0xf54a8ffe50b308a2d37f44a9e595fd2d156c09732b712b8548eccf1dce4d0fde
#main chain import pri key retrieve1=19P3ZQg5VYgzTUGvLD4etFSrh74mk6HUWW
#1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL chain33_ImportPrivkey "${retrieve1_key}" "${retrieve1}" "retrieve1" "${MAIN_HTTP}"
chain33_ImportPrivkey "0x3665fa66d1a17d2fc319a45250c8c8b9302ae0c393c2e39f2ef3b2f6bc40a42d" "1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL" "retrieve1" "${main_ip}" chain33_applyCoins "${retrieve1}" 10000000000 "${MAIN_HTTP}"
#13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx
chain33_ImportPrivkey "0xed8a078ee44eac473bd1d5c971e231c255badf7f0c2fbdbe31ef34669c441d6f" "13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx" "retrieve2" "$main_ip"
local retrieve1="1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL" retrieve2_key=0x61d86bf173ed37835fba9ff5b062382249c1b978cb2d3c6e2a3abbdf38314432
local retrieve2="13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx" retrieve2=18x7o8Uktqs8RHEcPsMLJvaHKo22swLbqF
chain33_ImportPrivkey "${retrieve2_key}" "${retrieve2}" "retrieve2" "${MAIN_HTTP}"
chain33_applyCoins "${retrieve2}" 10000000000 "${MAIN_HTTP}"
if [ "$ispara" == false ]; then if [ "$ispara" == true ]; then
chain33_applyCoins "$retrieve1" 12000000000 "${main_ip}" # for fee
chain33_QueryBalance "${retrieve1}" "$main_ip" local main_ip=${MAIN_HTTP//8901/8801}
chain33_applyCoins "${retrieve1}" 1000000000 "${main_ip}"
chain33_applyCoins "$retrieve2" 12000000000 "${main_ip}" chain33_applyCoins "${retrieve2}" 1000000000 "${main_ip}"
chain33_QueryBalance "${retrieve2}" "$main_ip"
else
# tx fee
chain33_applyCoins "$retrieve1" 1000000000 "${main_ip}"
chain33_QueryBalance "${retrieve1}" "$main_ip"
chain33_applyCoins "$retrieve2" 1000000000 "${main_ip}"
chain33_QueryBalance "${retrieve2}" "$main_ip"
local para_ip="${MAIN_HTTP}"
#para chain import pri key
chain33_ImportPrivkey "0x3665fa66d1a17d2fc319a45250c8c8b9302ae0c393c2e39f2ef3b2f6bc40a42d" "1PdaXiQU994gzh4RcjLir2AbyqcQ3TwnBL" "retrieve1" "$para_ip"
chain33_ImportPrivkey "0xed8a078ee44eac473bd1d5c971e231c255badf7f0c2fbdbe31ef34669c441d6f" "13t1hnMNHqQ5K4QPeqq5xmdg2kTbDPtrgx" "retrieve2" "$para_ip"
chain33_applyCoins "$retrieve1" 12000000000 "${para_ip}"
chain33_QueryBalance "${retrieve1}" "$para_ip"
chain33_applyCoins "$retrieve2" 12000000000 "${para_ip}"
chain33_QueryBalance "${retrieve2}" "$para_ip"
fi fi
chain33_SendToAddress "$retrieve1" "$retrieve_addr" 1000000000 ${MAIN_HTTP} chain33_SendToAddress "$retrieve1" "$retrieve_addr" 1000000000 ${MAIN_HTTP}
chain33_QueryExecBalance "${retrieve1}" "retrieve" "$MAIN_HTTP"
chain33_SendToAddress "$retrieve2" "$retrieve_addr" 1000000000 ${MAIN_HTTP} chain33_SendToAddress "$retrieve2" "$retrieve_addr" 1000000000 ${MAIN_HTTP}
chain33_QueryExecBalance "${retrieve2}" "retrieve" "$MAIN_HTTP" symbol="RETRIEVE"
createToken "$symbol" "$retrieve2" "$retrieve2_key"
chain33_BlockWait 1 "${MAIN_HTTP}" chain33_BlockWait 1 "${MAIN_HTTP}"
} }
...@@ -168,6 +239,8 @@ function run_test() { ...@@ -168,6 +239,8 @@ function run_test() {
sleep 61 sleep 61
retrieve_Perform retrieve_Perform
retrieve_QueryResult 3 retrieve_QueryResult 3
retrieve_Perform_Token
retrieve_QueryAssetResult 3
} }
function main() { function main() {
...@@ -186,4 +259,6 @@ function main() { ...@@ -186,4 +259,6 @@ function main() {
fi fi
} }
set -x
chain33_debug_function main "$1" chain33_debug_function main "$1"
...@@ -168,7 +168,7 @@ func performCmd(cmd *cobra.Command, args []string) { ...@@ -168,7 +168,7 @@ func performCmd(cmd *cobra.Command, args []string) {
return return
} }
for i := 0; i < len(execs); i++ { for i := 0; i < len(execs); i++ {
params.Assets = append(params.Assets, rpc.Asset{Exec: execs[i], Symbol: symbols[0]}) params.Assets = append(params.Assets, rpc.Asset{Exec: execs[i], Symbol: symbols[i]})
} }
ctx := jsonrpc.NewRPCCtx(rpcLaddr, "retrieve.CreateRawRetrievePerformTx", params, nil) ctx := jsonrpc.NewRPCCtx(rpcLaddr, "retrieve.CreateRawRetrievePerformTx", params, nil)
...@@ -206,7 +206,7 @@ func cancelCmd(cmd *cobra.Command, args []string) { ...@@ -206,7 +206,7 @@ func cancelCmd(cmd *cobra.Command, args []string) {
func RetrieveQueryCmd() *cobra.Command { func RetrieveQueryCmd() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "query", Use: "query",
Short: "Backup the wallet", Short: "show retrieve info",
Run: queryRetrieveCmd, Run: queryRetrieveCmd,
} }
addQueryRetrieveCmdFlags(cmd) addQueryRetrieveCmdFlags(cmd)
...@@ -218,6 +218,9 @@ func addQueryRetrieveCmdFlags(cmd *cobra.Command) { ...@@ -218,6 +218,9 @@ func addQueryRetrieveCmdFlags(cmd *cobra.Command) {
cmd.MarkFlagRequired("backup") cmd.MarkFlagRequired("backup")
cmd.Flags().StringP("default", "t", "", "default address") cmd.Flags().StringP("default", "t", "", "default address")
cmd.MarkFlagRequired("default") cmd.MarkFlagRequired("default")
cmd.Flags().StringP("asset_exec", "e", "", "asset exec")
cmd.Flags().StringP("asset_symbol", "s", "", "asset symbol")
} }
func parseRerieveDetail(arg interface{}) (interface{}, error) { func parseRerieveDetail(arg interface{}) (interface{}, error) {
...@@ -246,10 +249,14 @@ func queryRetrieveCmd(cmd *cobra.Command, args []string) { ...@@ -246,10 +249,14 @@ func queryRetrieveCmd(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
backup, _ := cmd.Flags().GetString("backup") backup, _ := cmd.Flags().GetString("backup")
defaultAddr, _ := cmd.Flags().GetString("default") defaultAddr, _ := cmd.Flags().GetString("default")
exec, _ := cmd.Flags().GetString("asset_exec")
symbol, _ := cmd.Flags().GetString("asset_symbol")
req := &rt.ReqRetrieveInfo{ req := &rt.ReqRetrieveInfo{
BackupAddress: backup, BackupAddress: backup,
DefaultAddress: defaultAddr, DefaultAddress: defaultAddr,
AssetExec: exec,
AssetSymbol: symbol,
} }
var params rpctypes.Query4Jrpc var params rpctypes.Query4Jrpc
......
...@@ -97,7 +97,7 @@ func (c *Retrieve) ExecDelLocal_Perform(perf *rt.PerformRetrieve, tx *types.Tran ...@@ -97,7 +97,7 @@ func (c *Retrieve) ExecDelLocal_Perform(perf *rt.PerformRetrieve, tx *types.Tran
if types.IsDappFork(c.GetHeight(), rt.RetrieveX, rt.ForkRetriveAssetX) { if types.IsDappFork(c.GetHeight(), rt.RetrieveX, rt.ForkRetriveAssetX) {
if len(perf.Assets) == 0 { if len(perf.Assets) == 0 {
perf.Assets = append(perf.Assets, &types.Asset{Exec: "coins", Symbol: types.GetCoinSymbol()}) perf.Assets = append(perf.Assets, &rt.AssetSymbol{Exec: "coins", Symbol: types.GetCoinSymbol()})
} }
} }
for _, asset := range perf.Assets { for _, asset := range perf.Assets {
......
...@@ -104,7 +104,7 @@ func (c *Retrieve) ExecLocal_Perform(perf *rt.PerformRetrieve, tx *types.Transac ...@@ -104,7 +104,7 @@ func (c *Retrieve) ExecLocal_Perform(perf *rt.PerformRetrieve, tx *types.Transac
} }
if types.IsDappFork(c.GetHeight(), rt.RetrieveX, rt.ForkRetriveAssetX) { if types.IsDappFork(c.GetHeight(), rt.RetrieveX, rt.ForkRetriveAssetX) {
if len(perf.Assets) == 0 { if len(perf.Assets) == 0 {
perf.Assets = append(perf.Assets, &types.Asset{Exec: "coins", Symbol: types.GetCoinSymbol()}) perf.Assets = append(perf.Assets, &rt.AssetSymbol{Exec: "coins", Symbol: types.GetCoinSymbol()})
} }
} }
for _, asset := range perf.Assets { for _, asset := range perf.Assets {
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
package executor package executor
import ( import (
"fmt"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
rt "github.com/33cn/plugin/plugin/dapp/retrieve/types" rt "github.com/33cn/plugin/plugin/dapp/retrieve/types"
) )
...@@ -29,11 +27,9 @@ func (r *Retrieve) Query_GetRetrieveInfo(in *rt.ReqRetrieveInfo) (types.Message, ...@@ -29,11 +27,9 @@ func (r *Retrieve) Query_GetRetrieveInfo(in *rt.ReqRetrieveInfo) (types.Message,
if info.Status == retrievePerform && in.GetAssetExec() != "" { if info.Status == retrievePerform && in.GetAssetExec() != "" {
// retrievePerform状态下,不存在有两种情况 // retrievePerform状态下,不存在有两种情况
// 1 还没找回, 2 fork 之前是没有coins 找回记录的 // 1 还没找回, 2 fork 之前是没有coins 找回记录的
count := r.GetLocalDB().PrefixCount(calcRetrieveAssetPrefix(in.BackupAddress, in.DefaultAddress))
// 2 fork 之前是 没有coins 找回记录的, 相当于都找回了 // 2 fork 之前是 没有coins 找回记录的, 相当于都找回了
if count == 0 { // localdb not support PrefixCount
return info, nil // 所以在填写具体资产的情况下, 认为是要找对应的资产
}
asset, _ := getRetrieveAsset(r.GetLocalDB(), in.BackupAddress, in.DefaultAddress, in.AssetExec, in.AssetSymbol) asset, _ := getRetrieveAsset(r.GetLocalDB(), in.BackupAddress, in.DefaultAddress, in.AssetExec, in.AssetSymbol)
if asset != nil { if asset != nil {
...@@ -48,8 +44,3 @@ func (r *Retrieve) Query_GetRetrieveInfo(in *rt.ReqRetrieveInfo) (types.Message, ...@@ -48,8 +44,3 @@ func (r *Retrieve) Query_GetRetrieveInfo(in *rt.ReqRetrieveInfo) (types.Message,
} }
return info, nil return info, nil
} }
func calcRetrieveAssetPrefix(backupAddr, defaultAddr string) []byte {
key := fmt.Sprintf("LODB-retrieve-backup-asset:%s:%s:", backupAddr, defaultAddr)
return []byte(key)
}
...@@ -211,7 +211,7 @@ func (action *Action) RetrievePerformAssets(perfRet *rt.PerformRetrieve, default ...@@ -211,7 +211,7 @@ func (action *Action) RetrievePerformAssets(perfRet *rt.PerformRetrieve, default
// 兼容原来的找回, 在不指定的情况下,找回主币 // 兼容原来的找回, 在不指定的情况下,找回主币
if len(perfRet.Assets) == 0 { if len(perfRet.Assets) == 0 {
perfRet.Assets = append(perfRet.Assets, &types.Asset{Exec: "coins", Symbol: types.GetCoinSymbol()}) perfRet.Assets = append(perfRet.Assets, &rt.AssetSymbol{Exec: "coins", Symbol: types.GetCoinSymbol()})
//return nil, nil //return nil, nil
} }
...@@ -224,7 +224,7 @@ func (action *Action) RetrievePerformAssets(perfRet *rt.PerformRetrieve, default ...@@ -224,7 +224,7 @@ func (action *Action) RetrievePerformAssets(perfRet *rt.PerformRetrieve, default
acc := accdb.LoadExecAccount(defaultAddress, action.execaddr) acc := accdb.LoadExecAccount(defaultAddress, action.execaddr)
rlog.Debug("RetrievePerform", "acc.Balance", acc.Balance) rlog.Debug("RetrievePerform", "acc.Balance", acc.Balance)
if acc.Balance > 0 { if acc.Balance > 0 {
receipt, err = action.coinsAccount.ExecTransfer(defaultAddress, perfRet.BackupAddress, action.execaddr, acc.Balance) receipt, err = accdb.ExecTransfer(defaultAddress, perfRet.BackupAddress, action.execaddr, acc.Balance)
if err != nil { if err != nil {
rlog.Debug("RetrievePerform", "ExecTransfer", err) rlog.Debug("RetrievePerform", "ExecTransfer", err)
return nil, err return nil, err
......
...@@ -40,10 +40,16 @@ message PrepareRetrieve { ...@@ -40,10 +40,16 @@ message PrepareRetrieve {
string defaultAddress = 2; string defaultAddress = 2;
} }
message AssetSymbol {
string exec = 1;
string symbol = 2;
}
message PerformRetrieve { message PerformRetrieve {
string backupAddress = 1; string backupAddress = 1;
string defaultAddress = 2; string defaultAddress = 2;
repeated Asset assets = 3; repeated AssetSymbol assets = 3;
} }
message CancelRetrieve { message CancelRetrieve {
......
...@@ -49,6 +49,11 @@ func (c *Jrpc) CreateRawRetrievePerformTx(in *RetrievePerformTx, result *interfa ...@@ -49,6 +49,11 @@ func (c *Jrpc) CreateRawRetrievePerformTx(in *RetrievePerformTx, result *interfa
head := &types.PerformRetrieve{ head := &types.PerformRetrieve{
BackupAddress: in.BackupAddr, BackupAddress: in.BackupAddr,
DefaultAddress: in.DefaultAddr, DefaultAddress: in.DefaultAddr,
Assets: []*types.AssetSymbol{},
}
for i := 0; i < len(in.Assets); i++ {
head.Assets = append(head.Assets, &types.AssetSymbol{Exec: in.Assets[i].Exec, Symbol: in.Assets[i].Symbol})
} }
reply, err := c.cli.Perform(context.Background(), head) reply, err := c.cli.Perform(context.Background(), head)
if err != nil { if err != nil {
......
...@@ -8,11 +8,14 @@ import ( ...@@ -8,11 +8,14 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/33cn/chain33/common"
commonlog "github.com/33cn/chain33/common/log" commonlog "github.com/33cn/chain33/common/log"
"github.com/33cn/chain33/rpc/jsonclient" "github.com/33cn/chain33/rpc/jsonclient"
rpctypes "github.com/33cn/chain33/rpc/types" rpctypes "github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/33cn/chain33/util/testnode" "github.com/33cn/chain33/util/testnode"
"github.com/33cn/plugin/plugin/dapp/retrieve/rpc" "github.com/33cn/plugin/plugin/dapp/retrieve/rpc"
pty "github.com/33cn/plugin/plugin/dapp/retrieve/types" pty "github.com/33cn/plugin/plugin/dapp/retrieve/types"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
...@@ -67,8 +70,28 @@ func testPrepareCmd(t *testing.T, jrpc *jsonclient.JSONClient) error { ...@@ -67,8 +70,28 @@ func testPrepareCmd(t *testing.T, jrpc *jsonclient.JSONClient) error {
} }
func testPerformCmd(t *testing.T, jrpc *jsonclient.JSONClient) error { func testPerformCmd(t *testing.T, jrpc *jsonclient.JSONClient) error {
params := rpc.RetrievePerformTx{} params := rpc.RetrievePerformTx{
return jrpc.Call("retrieve.CreateRawRetrievePerformTx", params, nil) BackupAddr: "b",
DefaultAddr: "d",
Assets: []rpc.Asset{{"e", "s"}},
}
var txS string
t.Log("tx info", "x", params.Assets)
err := jrpc.Call("retrieve.CreateRawRetrievePerformTx", &params, &txS)
var tx types.Transaction
bytes, err := common.FromHex(txS)
if err != nil {
return err
}
err = types.Decode(bytes, &tx)
if err != nil {
return err
}
var p2 pty.RetrieveAction
err = types.Decode(tx.Payload, &p2)
t.Log("asset", p2.GetPerform().GetAssets())
return err
} }
func testCancelCmd(t *testing.T, jrpc *jsonclient.JSONClient) error { func testCancelCmd(t *testing.T, jrpc *jsonclient.JSONClient) error {
......
...@@ -43,10 +43,12 @@ func (c *channelClient) Perform(ctx context.Context, v *rt.PerformRetrieve) (*ty ...@@ -43,10 +43,12 @@ func (c *channelClient) Perform(ctx context.Context, v *rt.PerformRetrieve) (*ty
Ty: rt.RetrieveActionPerform, Ty: rt.RetrieveActionPerform,
Value: &rt.RetrieveAction_Perform{Perform: v}, Value: &rt.RetrieveAction_Perform{Perform: v},
} }
tx, err := types.CreateFormatTx(types.ExecName(rt.RetrieveX), types.Encode(perform)) payload := types.Encode(perform)
tx, err := types.CreateFormatTx(types.ExecName(rt.RetrieveX), payload)
if err != nil { if err != nil {
return nil, err return nil, err
} }
data := types.Encode(tx) data := types.Encode(tx)
return &types.UnsignTx{Data: data}, nil return &types.UnsignTx{Data: data}, nil
} }
......
...@@ -44,7 +44,7 @@ func (m *RetrievePara) Reset() { *m = RetrievePara{} } ...@@ -44,7 +44,7 @@ func (m *RetrievePara) Reset() { *m = RetrievePara{} }
func (m *RetrievePara) String() string { return proto.CompactTextString(m) } func (m *RetrievePara) String() string { return proto.CompactTextString(m) }
func (*RetrievePara) ProtoMessage() {} func (*RetrievePara) ProtoMessage() {}
func (*RetrievePara) Descriptor() ([]byte, []int) { func (*RetrievePara) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{0} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{0}
} }
func (m *RetrievePara) XXX_Unmarshal(b []byte) error { func (m *RetrievePara) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrievePara.Unmarshal(m, b) return xxx_messageInfo_RetrievePara.Unmarshal(m, b)
...@@ -112,7 +112,7 @@ func (m *Retrieve) Reset() { *m = Retrieve{} } ...@@ -112,7 +112,7 @@ func (m *Retrieve) Reset() { *m = Retrieve{} }
func (m *Retrieve) String() string { return proto.CompactTextString(m) } func (m *Retrieve) String() string { return proto.CompactTextString(m) }
func (*Retrieve) ProtoMessage() {} func (*Retrieve) ProtoMessage() {}
func (*Retrieve) Descriptor() ([]byte, []int) { func (*Retrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{1} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{1}
} }
func (m *Retrieve) XXX_Unmarshal(b []byte) error { func (m *Retrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Retrieve.Unmarshal(m, b) return xxx_messageInfo_Retrieve.Unmarshal(m, b)
...@@ -163,7 +163,7 @@ func (m *RetrieveAction) Reset() { *m = RetrieveAction{} } ...@@ -163,7 +163,7 @@ func (m *RetrieveAction) Reset() { *m = RetrieveAction{} }
func (m *RetrieveAction) String() string { return proto.CompactTextString(m) } func (m *RetrieveAction) String() string { return proto.CompactTextString(m) }
func (*RetrieveAction) ProtoMessage() {} func (*RetrieveAction) ProtoMessage() {}
func (*RetrieveAction) Descriptor() ([]byte, []int) { func (*RetrieveAction) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{2} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{2}
} }
func (m *RetrieveAction) XXX_Unmarshal(b []byte) error { func (m *RetrieveAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveAction.Unmarshal(m, b) return xxx_messageInfo_RetrieveAction.Unmarshal(m, b)
...@@ -378,7 +378,7 @@ func (m *BackupRetrieve) Reset() { *m = BackupRetrieve{} } ...@@ -378,7 +378,7 @@ func (m *BackupRetrieve) Reset() { *m = BackupRetrieve{} }
func (m *BackupRetrieve) String() string { return proto.CompactTextString(m) } func (m *BackupRetrieve) String() string { return proto.CompactTextString(m) }
func (*BackupRetrieve) ProtoMessage() {} func (*BackupRetrieve) ProtoMessage() {}
func (*BackupRetrieve) Descriptor() ([]byte, []int) { func (*BackupRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{3} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{3}
} }
func (m *BackupRetrieve) XXX_Unmarshal(b []byte) error { func (m *BackupRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BackupRetrieve.Unmarshal(m, b) return xxx_messageInfo_BackupRetrieve.Unmarshal(m, b)
...@@ -431,7 +431,7 @@ func (m *PrepareRetrieve) Reset() { *m = PrepareRetrieve{} } ...@@ -431,7 +431,7 @@ func (m *PrepareRetrieve) Reset() { *m = PrepareRetrieve{} }
func (m *PrepareRetrieve) String() string { return proto.CompactTextString(m) } func (m *PrepareRetrieve) String() string { return proto.CompactTextString(m) }
func (*PrepareRetrieve) ProtoMessage() {} func (*PrepareRetrieve) ProtoMessage() {}
func (*PrepareRetrieve) Descriptor() ([]byte, []int) { func (*PrepareRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{4} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{4}
} }
func (m *PrepareRetrieve) XXX_Unmarshal(b []byte) error { func (m *PrepareRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PrepareRetrieve.Unmarshal(m, b) return xxx_messageInfo_PrepareRetrieve.Unmarshal(m, b)
...@@ -465,10 +465,56 @@ func (m *PrepareRetrieve) GetDefaultAddress() string { ...@@ -465,10 +465,56 @@ func (m *PrepareRetrieve) GetDefaultAddress() string {
return "" return ""
} }
type AssetSymbol struct {
Exec string `protobuf:"bytes,1,opt,name=exec,proto3" json:"exec,omitempty"`
Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AssetSymbol) Reset() { *m = AssetSymbol{} }
func (m *AssetSymbol) String() string { return proto.CompactTextString(m) }
func (*AssetSymbol) ProtoMessage() {}
func (*AssetSymbol) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_1666ef19b265e4fc, []int{5}
}
func (m *AssetSymbol) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AssetSymbol.Unmarshal(m, b)
}
func (m *AssetSymbol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AssetSymbol.Marshal(b, m, deterministic)
}
func (dst *AssetSymbol) XXX_Merge(src proto.Message) {
xxx_messageInfo_AssetSymbol.Merge(dst, src)
}
func (m *AssetSymbol) XXX_Size() int {
return xxx_messageInfo_AssetSymbol.Size(m)
}
func (m *AssetSymbol) XXX_DiscardUnknown() {
xxx_messageInfo_AssetSymbol.DiscardUnknown(m)
}
var xxx_messageInfo_AssetSymbol proto.InternalMessageInfo
func (m *AssetSymbol) GetExec() string {
if m != nil {
return m.Exec
}
return ""
}
func (m *AssetSymbol) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
type PerformRetrieve struct { type PerformRetrieve struct {
BackupAddress string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"` BackupAddress string `protobuf:"bytes,1,opt,name=backupAddress,proto3" json:"backupAddress,omitempty"`
DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"` DefaultAddress string `protobuf:"bytes,2,opt,name=defaultAddress,proto3" json:"defaultAddress,omitempty"`
Assets []*types.Asset `protobuf:"bytes,3,rep,name=assets,proto3" json:"assets,omitempty"` Assets []*AssetSymbol `protobuf:"bytes,3,rep,name=assets,proto3" json:"assets,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
...@@ -478,7 +524,7 @@ func (m *PerformRetrieve) Reset() { *m = PerformRetrieve{} } ...@@ -478,7 +524,7 @@ func (m *PerformRetrieve) Reset() { *m = PerformRetrieve{} }
func (m *PerformRetrieve) String() string { return proto.CompactTextString(m) } func (m *PerformRetrieve) String() string { return proto.CompactTextString(m) }
func (*PerformRetrieve) ProtoMessage() {} func (*PerformRetrieve) ProtoMessage() {}
func (*PerformRetrieve) Descriptor() ([]byte, []int) { func (*PerformRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{5} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{6}
} }
func (m *PerformRetrieve) XXX_Unmarshal(b []byte) error { func (m *PerformRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PerformRetrieve.Unmarshal(m, b) return xxx_messageInfo_PerformRetrieve.Unmarshal(m, b)
...@@ -512,7 +558,7 @@ func (m *PerformRetrieve) GetDefaultAddress() string { ...@@ -512,7 +558,7 @@ func (m *PerformRetrieve) GetDefaultAddress() string {
return "" return ""
} }
func (m *PerformRetrieve) GetAssets() []*types.Asset { func (m *PerformRetrieve) GetAssets() []*AssetSymbol {
if m != nil { if m != nil {
return m.Assets return m.Assets
} }
...@@ -531,7 +577,7 @@ func (m *CancelRetrieve) Reset() { *m = CancelRetrieve{} } ...@@ -531,7 +577,7 @@ func (m *CancelRetrieve) Reset() { *m = CancelRetrieve{} }
func (m *CancelRetrieve) String() string { return proto.CompactTextString(m) } func (m *CancelRetrieve) String() string { return proto.CompactTextString(m) }
func (*CancelRetrieve) ProtoMessage() {} func (*CancelRetrieve) ProtoMessage() {}
func (*CancelRetrieve) Descriptor() ([]byte, []int) { func (*CancelRetrieve) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{6} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{7}
} }
func (m *CancelRetrieve) XXX_Unmarshal(b []byte) error { func (m *CancelRetrieve) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelRetrieve.Unmarshal(m, b) return xxx_messageInfo_CancelRetrieve.Unmarshal(m, b)
...@@ -579,7 +625,7 @@ func (m *ReqRetrieveInfo) Reset() { *m = ReqRetrieveInfo{} } ...@@ -579,7 +625,7 @@ func (m *ReqRetrieveInfo) Reset() { *m = ReqRetrieveInfo{} }
func (m *ReqRetrieveInfo) String() string { return proto.CompactTextString(m) } func (m *ReqRetrieveInfo) String() string { return proto.CompactTextString(m) }
func (*ReqRetrieveInfo) ProtoMessage() {} func (*ReqRetrieveInfo) ProtoMessage() {}
func (*ReqRetrieveInfo) Descriptor() ([]byte, []int) { func (*ReqRetrieveInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{7} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{8}
} }
func (m *ReqRetrieveInfo) XXX_Unmarshal(b []byte) error { func (m *ReqRetrieveInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqRetrieveInfo.Unmarshal(m, b) return xxx_messageInfo_ReqRetrieveInfo.Unmarshal(m, b)
...@@ -643,7 +689,7 @@ func (m *RetrieveQuery) Reset() { *m = RetrieveQuery{} } ...@@ -643,7 +689,7 @@ func (m *RetrieveQuery) Reset() { *m = RetrieveQuery{} }
func (m *RetrieveQuery) String() string { return proto.CompactTextString(m) } func (m *RetrieveQuery) String() string { return proto.CompactTextString(m) }
func (*RetrieveQuery) ProtoMessage() {} func (*RetrieveQuery) ProtoMessage() {}
func (*RetrieveQuery) Descriptor() ([]byte, []int) { func (*RetrieveQuery) Descriptor() ([]byte, []int) {
return fileDescriptor_retrieve_7b99e170a1cce215, []int{8} return fileDescriptor_retrieve_1666ef19b265e4fc, []int{9}
} }
func (m *RetrieveQuery) XXX_Unmarshal(b []byte) error { func (m *RetrieveQuery) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveQuery.Unmarshal(m, b) return xxx_messageInfo_RetrieveQuery.Unmarshal(m, b)
...@@ -711,6 +757,7 @@ func init() { ...@@ -711,6 +757,7 @@ func init() {
proto.RegisterType((*RetrieveAction)(nil), "types.RetrieveAction") proto.RegisterType((*RetrieveAction)(nil), "types.RetrieveAction")
proto.RegisterType((*BackupRetrieve)(nil), "types.BackupRetrieve") proto.RegisterType((*BackupRetrieve)(nil), "types.BackupRetrieve")
proto.RegisterType((*PrepareRetrieve)(nil), "types.PrepareRetrieve") proto.RegisterType((*PrepareRetrieve)(nil), "types.PrepareRetrieve")
proto.RegisterType((*AssetSymbol)(nil), "types.AssetSymbol")
proto.RegisterType((*PerformRetrieve)(nil), "types.PerformRetrieve") proto.RegisterType((*PerformRetrieve)(nil), "types.PerformRetrieve")
proto.RegisterType((*CancelRetrieve)(nil), "types.CancelRetrieve") proto.RegisterType((*CancelRetrieve)(nil), "types.CancelRetrieve")
proto.RegisterType((*ReqRetrieveInfo)(nil), "types.ReqRetrieveInfo") proto.RegisterType((*ReqRetrieveInfo)(nil), "types.ReqRetrieveInfo")
...@@ -888,41 +935,43 @@ var _Retrieve_serviceDesc = grpc.ServiceDesc{ ...@@ -888,41 +935,43 @@ var _Retrieve_serviceDesc = grpc.ServiceDesc{
Metadata: "retrieve.proto", Metadata: "retrieve.proto",
} }
func init() { proto.RegisterFile("retrieve.proto", fileDescriptor_retrieve_7b99e170a1cce215) } func init() { proto.RegisterFile("retrieve.proto", fileDescriptor_retrieve_1666ef19b265e4fc) }
var fileDescriptor_retrieve_7b99e170a1cce215 = []byte{ var fileDescriptor_retrieve_1666ef19b265e4fc = []byte{
// 527 bytes of a gzipped FileDescriptorProto // 552 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xd1, 0x6e, 0xd3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xc1, 0x6e, 0xd3, 0x40,
0x14, 0x9d, 0x5b, 0x9a, 0xae, 0xb7, 0x5b, 0x2a, 0x8c, 0x98, 0xa2, 0x09, 0x4d, 0x55, 0x34, 0xa1, 0x10, 0xed, 0xc6, 0x8d, 0xd3, 0x4c, 0xa8, 0x23, 0x16, 0x51, 0x59, 0x15, 0xaa, 0x22, 0x0b, 0xa1,
0xbe, 0x50, 0xa4, 0xc0, 0x0f, 0x74, 0x08, 0x09, 0xde, 0x8a, 0x19, 0xaf, 0x20, 0x37, 0xb9, 0x45, 0x08, 0x89, 0x20, 0x19, 0x2e, 0x1c, 0x53, 0x84, 0x04, 0xb7, 0x60, 0xca, 0x15, 0xb4, 0x71, 0x26,
0x11, 0x6d, 0x12, 0x6c, 0x67, 0x5a, 0xde, 0x78, 0xe1, 0x3b, 0xf8, 0x07, 0xfe, 0x86, 0x17, 0x7e, 0xc8, 0x22, 0xb1, 0xc3, 0xee, 0xa6, 0xaa, 0x6f, 0xdc, 0xf9, 0x08, 0xfe, 0x81, 0xbf, 0xe1, 0xc2,
0x82, 0x1f, 0x40, 0xb1, 0x1d, 0xcd, 0x29, 0xa9, 0xb4, 0x87, 0x8a, 0xc7, 0x1c, 0x9f, 0x63, 0xdf, 0x4f, 0xf0, 0x03, 0xc8, 0xb3, 0x6b, 0x65, 0x13, 0x1c, 0xa9, 0x87, 0xa8, 0xb7, 0xf8, 0xed, 0x7b,
0x7b, 0xee, 0xed,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x9c, 0x10, 0xf4, 0xdc, 0x10, 0x8c, 0x7e, 0x13, 0x38, 0x6e, 0x22, 0x98, 0xbe, 0x50, 0xf4, 0x9b, 0xc1, 0x69, 0x5d, 0xde, 0xfb, 0x35, 0xca, 0xf2, 0xae, 0xb7, 0xf5, 0x16, 0x59,
0x84, 0xa1, 0xdd, 0x69, 0xba, 0x27, 0x33, 0xce, 0x27, 0x16, 0xff, 0x90, 0xc9, 0xf4, 0x73, 0x76, 0x76, 0x01, 0x20, 0x71, 0x29, 0xb2, 0x9c, 0x08, 0x26, 0xca, 0x1c, 0xc4, 0x49, 0x51, 0xdf, 0x4d,
0x7d, 0x1b, 0x1e, 0x69, 0x95, 0x8d, 0x84, 0x3d, 0xa9, 0xd1, 0xa5, 0x8a, 0xc0, 0x33, 0xbf, 0x60, 0xd1, 0xf8, 0x0f, 0x83, 0x93, 0x3a, 0xc3, 0xf9, 0x4b, 0xe8, 0xd8, 0x3f, 0x05, 0xdf, 0x13, 0x3a,
0xda, 0x9d, 0x1b, 0x7b, 0x34, 0x66, 0x15, 0x69, 0x77, 0x74, 0x74, 0x68, 0x56, 0x9e, 0xfe, 0xf7, 0xe7, 0x7d, 0x8b, 0x7f, 0xcc, 0x55, 0xf6, 0x25, 0xbf, 0xba, 0x89, 0x8e, 0x48, 0x65, 0x33, 0x65,
0x78, 0xf1, 0x37, 0x00, 0x00, 0xff, 0xff, 0x32, 0x13, 0x1c, 0xa2, 0x69, 0x06, 0x00, 0x00, 0x4f, 0xec, 0x34, 0xa9, 0x62, 0xf0, 0x4d, 0x04, 0xf0, 0xe6, 0xe0, 0xd9, 0xa3, 0x31, 0xab, 0xc8,
0x9b, 0xb3, 0xa7, 0x41, 0x33, 0xf5, 0xe9, 0xf3, 0xf3, 0xe2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff,
0x01, 0xad, 0xc9, 0x3d, 0xaa, 0x06, 0x00, 0x00,
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment