Commit 057517ca authored by 张振华's avatar 张振华

update

parent 3e29f9e9
......@@ -323,12 +323,13 @@ func SendTx(hexTx string) {
}
func testQueryGamesByIds(gameIds []string) {
str := fmt.Sprintf("{%s}", gameIds[0])
str := fmt.Sprintf("\"%s\"", gameIds[0])
for i := 1 ; i < len(gameIds); i++ {
str = fmt.Sprintf(",{\"%s\"}", gameIds[i])
str = str + fmt.Sprintf(",\"%s\"", gameIds[i])
}
fmt.Println("str:", str)
poststr := fmt.Sprintf(`{"jsonrpc":"2.0","id":0,"method":"Chain33.Query",
"params":[{"execer":"guess","funcName":"QueryGamesByIds","payload":{"gameIds":[%v]}}]}`, gameId, str)
"params":[{"execer":"guess","funcName":"QueryGamesByIds","payload":{"gameIds":[%s]}}]}`,str)
fmt.Println("post data:", poststr)
resp, err := http.Post(getJrpc(), "application/json", bytes.NewBufferString(poststr))
......
This diff is collapsed.
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