Commit 51804c73 authored by vipwzw's avatar vipwzw

auto ci

parent 092af9e8
......@@ -10,11 +10,11 @@ import (
"path/filepath"
"github.com/33cn/chain33/types"
_ "github.com/33cn/plugin/plugin/crypto/init"
"github.com/33cn/plugin/plugin/dapp/cert/authority/tools/cryptogen/generator"
ca "github.com/33cn/plugin/plugin/dapp/cert/authority/tools/cryptogen/generator/impl"
"github.com/BurntSushi/toml"
"github.com/spf13/cobra"
_ "github.com/33cn/plugin/plugin/crypto/init"
)
const (
......
......@@ -167,7 +167,7 @@ func (action *Action) saveGame(game *pkt.PokerBull) (kvset []*types.KeyValue, er
value := types.Encode(game)
err = action.db.Set(Key(game.GetGameId()), value)
if err != nil {
return nil,err
return nil, err
}
kvset = append(kvset, &types.KeyValue{Key: Key(game.GameId), Value: value})
return kvset, nil
......@@ -680,7 +680,7 @@ func (action *Action) GameStart(start *pkt.PBGameStart) (*types.Receipt, error)
}
receiptLog := action.GetReceiptLog(game)
logs = append(logs, receiptLog)
gamekv,err := action.saveGame(game)
gamekv, err := action.saveGame(game)
if err != nil {
logger.Error("GameStart", "addr", action.fromaddr, "execaddr", action.execaddr, "err", "save game to db failed")
return nil, err
......@@ -792,7 +792,7 @@ func (action *Action) GameContinue(pbcontinue *pkt.PBGameContinue) (*types.Recei
receiptLog := action.GetReceiptLog(game)
logs = append(logs, receiptLog)
gamekv,err := action.saveGame(game)
gamekv, err := action.saveGame(game)
if err != nil {
logger.Error("GameContinue", "GameID", pbcontinue.GetGameId(), "addr", action.fromaddr, "execaddr",
action.execaddr, "err", "save game to db failed")
......@@ -869,13 +869,13 @@ func (action *Action) GameQuit(pbquit *pkt.PBGameQuit) (*types.Receipt, error) {
receiptLog := action.GetReceiptLog(game)
logs = append(logs, receiptLog)
gamekv,err := action.saveGame(game)
gamekv, err := action.saveGame(game)
if err != nil {
logger.Error("GameQuit", "GameID", pbquit.GetGameId(), "addr", action.fromaddr, "execaddr",
action.execaddr, "err", "save game to db failed")
return nil, err
}
kv = append(kv,gamekv...)
kv = append(kv, gamekv...)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
......@@ -998,7 +998,7 @@ func (action *Action) GamePlay(pbplay *pkt.PBGamePlay) (*types.Receipt, error) {
receiptLog := action.GetReceiptLog(game)
logs = append(logs, receiptLog)
gamekv,err := action.saveGame(game)
gamekv, err := action.saveGame(game)
if err != nil {
logger.Error("Pokerbull game play", "GameID", pbplay.GetGameId(), "round", pbplay.Round, "value",
pbplay.Value, "players", strings.Join(pbplay.Address, ","), "err", "save game to db failed")
......
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