Commit 2447cb40 authored by gitlab's avatar gitlab Committed by vipwzw

auto ci

parent 1128378d
......@@ -43,6 +43,7 @@ type Action struct {
localDB dbm.Lister
index int
}
// NewAction 创建action
func NewAction(pb *PokerBull, tx *types.Transaction, index int) *Action {
hash := tx.Hash()
......@@ -614,7 +615,7 @@ func (action *Action) GameStart(start *pkt.PBGameStart) (*types.Receipt, error)
logs = append(logs, receiptLog)
kv = append(kv, action.saveGame(game)...)
return &types.Receipt{Ty:types.ExecOk, KV: kv, Logs: logs}, nil
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
func getReadyPlayerNum(players []*pkt.PBPlayer) int {
......
......@@ -33,7 +33,7 @@ func (c *channelClient) Start(ctx context.Context, head *pb.PBGameStart) (*types
func (c *channelClient) Continue(ctx context.Context, head *pb.PBGameContinue) (*types.UnsignTx, error) {
val := &pb.PBGameAction{
Ty: pb.PBGameActionContinue,
Value: &pb.PBGameAction_Continue{Continue:head},
Value: &pb.PBGameAction_Continue{Continue: head},
}
tx, err := types.CreateFormatTx(pb.PokerBullX, types.Encode(val))
if err != nil {
......@@ -46,7 +46,7 @@ func (c *channelClient) Continue(ctx context.Context, head *pb.PBGameContinue) (
func (c *channelClient) Quit(ctx context.Context, head *pb.PBGameQuit) (*types.UnsignTx, error) {
val := &pb.PBGameAction{
Ty: pb.PBGameActionQuit,
Value: &pb.PBGameAction_Quit{Quit:head},
Value: &pb.PBGameAction_Quit{Quit: head},
}
tx, err := types.CreateFormatTx(pb.PokerBullX, types.Encode(val))
if err != nil {
......@@ -59,7 +59,7 @@ func (c *channelClient) Quit(ctx context.Context, head *pb.PBGameQuit) (*types.U
func (c *channelClient) Show(ctx context.Context, head *pb.PBGameQuery) (*types.UnsignTx, error) {
val := &pb.PBGameAction{
Ty: pb.PBGameActionQuery,
Value: &pb.PBGameAction_Query{Query:head},
Value: &pb.PBGameAction_Query{Query: head},
}
tx, err := types.CreateFormatTx(pb.PokerBullX, types.Encode(val))
if err != nil {
......
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