Commit 91390fe4 authored by harrylee's avatar harrylee Committed by vipwzw

fix a bug for make linter

parent 5711063d
...@@ -36,7 +36,7 @@ var ( ...@@ -36,7 +36,7 @@ var (
func TestGame(t *testing.T) { func TestGame(t *testing.T) {
types.SetTitleOnlyForTest("chain33") types.SetTitleOnlyForTest("chain33")
total := int64(100 * types.Coin) total := 100 * types.Coin
accountA := types.Account{ accountA := types.Account{
Balance: total, Balance: total,
Frozen: 0, Frozen: 0,
...@@ -112,10 +112,10 @@ func TestGame(t *testing.T) { ...@@ -112,10 +112,10 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
gameId := common.ToHex(createTx.Hash()) gameID := common.ToHex(createTx.Hash())
//match game //match game
matchParam := &pty.GamePreMatchTx{GameID: gameId, Guess: Scissor, Fee: 100000} matchParam := &pty.GamePreMatchTx{GameID: gameID, Guess: Scissor, Fee: 100000}
matchTx, err := pty.CreateRawGamePreMatchTx(matchParam) matchTx, err := pty.CreateRawGamePreMatchTx(matchParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -141,7 +141,7 @@ func TestGame(t *testing.T) { ...@@ -141,7 +141,7 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
msg, err := exec.Query(pty.FuncNameQueryGameListByIds, types.Encode(&pty.QueryGameInfos{ msg, err := exec.Query(pty.FuncNameQueryGameListByIds, types.Encode(&pty.QueryGameInfos{
GameIds: []string{gameId}, GameIds: []string{gameID},
})) }))
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -149,7 +149,7 @@ func TestGame(t *testing.T) { ...@@ -149,7 +149,7 @@ func TestGame(t *testing.T) {
t.Log(msg) t.Log(msg)
msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{ msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{
GameId: gameId})) GameId: gameID}))
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
...@@ -162,7 +162,7 @@ func TestGame(t *testing.T) { ...@@ -162,7 +162,7 @@ func TestGame(t *testing.T) {
} }
//close game //close game
closeParam := &pty.GamePreCloseTx{GameID: gameId, Secret: "harrylee", Result: Rock, Fee: 100000} closeParam := &pty.GamePreCloseTx{GameID: gameID, Secret: "harrylee", Result: Rock, Fee: 100000}
closeTx, err := pty.CreateRawGamePreCloseTx(closeParam) closeTx, err := pty.CreateRawGamePreCloseTx(closeParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -193,7 +193,7 @@ func TestGame(t *testing.T) { ...@@ -193,7 +193,7 @@ func TestGame(t *testing.T) {
t.Log(acB) t.Log(acB)
msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{ msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{
GameId: gameId})) GameId: gameID}))
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
...@@ -233,10 +233,10 @@ func TestGame(t *testing.T) { ...@@ -233,10 +233,10 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
gameId = common.ToHex(createTx.Hash()) gameID = common.ToHex(createTx.Hash())
//cancle game //cancle game
cancleParam := &pty.GamePreCancelTx{Fee: 1e5, GameID: gameId} cancleParam := &pty.GamePreCancelTx{Fee: 1e5, GameID: gameID}
cancelTx, err := pty.CreateRawGamePreCancelTx(cancleParam) cancelTx, err := pty.CreateRawGamePreCancelTx(cancleParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -264,7 +264,7 @@ func TestGame(t *testing.T) { ...@@ -264,7 +264,7 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{ msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{
GameId: gameId})) GameId: gameID}))
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
...@@ -303,10 +303,10 @@ func TestGame(t *testing.T) { ...@@ -303,10 +303,10 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
gameId = common.ToHex(createTx.Hash()) gameID = common.ToHex(createTx.Hash())
//match game //match game
matchParam = &pty.GamePreMatchTx{GameID: gameId, Guess: Rock, Fee: 100000} matchParam = &pty.GamePreMatchTx{GameID: gameID, Guess: Rock, Fee: 100000}
matchTx, err = pty.CreateRawGamePreMatchTx(matchParam) matchTx, err = pty.CreateRawGamePreMatchTx(matchParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -333,7 +333,7 @@ func TestGame(t *testing.T) { ...@@ -333,7 +333,7 @@ func TestGame(t *testing.T) {
} }
//close game //close game
closeParam = &pty.GamePreCloseTx{GameID: gameId, Secret: "123456", Result: Rock, Fee: 100000} closeParam = &pty.GamePreCloseTx{GameID: gameID, Secret: "123456", Result: Rock, Fee: 100000}
closeTx, err = pty.CreateRawGamePreCloseTx(closeParam) closeTx, err = pty.CreateRawGamePreCloseTx(closeParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -360,7 +360,7 @@ func TestGame(t *testing.T) { ...@@ -360,7 +360,7 @@ func TestGame(t *testing.T) {
} }
msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{ msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{
GameId: gameId})) GameId: gameID}))
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
...@@ -399,10 +399,10 @@ func TestGame(t *testing.T) { ...@@ -399,10 +399,10 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
gameId = common.ToHex(createTx.Hash()) gameID = common.ToHex(createTx.Hash())
//match game //match game
matchParam = &pty.GamePreMatchTx{GameID: gameId, Guess: Paper, Fee: 100000} matchParam = &pty.GamePreMatchTx{GameID: gameID, Guess: Paper, Fee: 100000}
matchTx, err = pty.CreateRawGamePreMatchTx(matchParam) matchTx, err = pty.CreateRawGamePreMatchTx(matchParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -428,7 +428,7 @@ func TestGame(t *testing.T) { ...@@ -428,7 +428,7 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
//close game //close game
closeParam = &pty.GamePreCloseTx{GameID: gameId, Secret: "123456", Result: Rock, Fee: 100000} closeParam = &pty.GamePreCloseTx{GameID: gameID, Secret: "123456", Result: Rock, Fee: 100000}
closeTx, err = pty.CreateRawGamePreCloseTx(closeParam) closeTx, err = pty.CreateRawGamePreCloseTx(closeParam)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
...@@ -454,7 +454,7 @@ func TestGame(t *testing.T) { ...@@ -454,7 +454,7 @@ func TestGame(t *testing.T) {
kvdb.Set(kv.Key, kv.Value) kvdb.Set(kv.Key, kv.Value)
} }
msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{ msg, err = exec.Query(pty.FuncNameQueryGameByID, types.Encode(&pty.QueryGameInfo{
GameId: gameId})) GameId: gameID}))
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
......
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