Commit 96391f7b authored by 张振华's avatar 张振华

refactor

parent 0420e49a
...@@ -48,12 +48,11 @@ func addGuessStartFlags(cmd *cobra.Command) { ...@@ -48,12 +48,11 @@ func addGuessStartFlags(cmd *cobra.Command) {
cmd.Flags().StringP("options", "o", "", "options") cmd.Flags().StringP("options", "o", "", "options")
cmd.MarkFlagRequired("options") cmd.MarkFlagRequired("options")
cmd.Flags().StringP("maxBetTime", "b", "", "max time to bet, after this bet is forbidden") cmd.Flags().StringP("category", "c", "default", "options")
cmd.Flags().Int64P("maxBetHeight", "c", 0, "max height to bet, after this bet is forbidden")
cmd.Flags().StringP("symbol", "s", "bty", "token symbol")
cmd.Flags().StringP("exec", "e", "coins", "excutor name")
cmd.Flags().Int64P("maxBetsOneTime", "m", 10000, "max bets one time") cmd.Flags().Int64P("maxBetHeight", "m", 0, "max height to bet, after this bet is forbidden")
cmd.Flags().Int64P("maxBetsOneTime", "s", 10000, "max bets one time")
//cmd.MarkFlagRequired("maxBets") //cmd.MarkFlagRequired("maxBets")
cmd.Flags().Int64P("maxBetsNumber", "n", 100000, "max bets number") cmd.Flags().Int64P("maxBetsNumber", "n", 100000, "max bets number")
...@@ -67,43 +66,39 @@ func addGuessStartFlags(cmd *cobra.Command) { ...@@ -67,43 +66,39 @@ func addGuessStartFlags(cmd *cobra.Command) {
cmd.Flags().StringP("platFeeAddr", "q", "", "plat address to receive share") cmd.Flags().StringP("platFeeAddr", "q", "", "plat address to receive share")
cmd.Flags().StringP("expire", "x", "", "expire time of the game, after this any addr can abort it") cmd.Flags().Int64P("expireHeight", "e", 0, "expire height of the game, after this any addr can abort it")
cmd.Flags().Int64P("expireHeight", "y", 0, "expire height of the game, after this any addr can abort it") cmd.Flags().Float64P("fee", "g", 0.01, "tx fee")
} }
func guessStart(cmd *cobra.Command, args []string) { func guessStart(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
topic, _ := cmd.Flags().GetString("topic") topic, _ := cmd.Flags().GetString("topic")
category, _ := cmd.Flags().GetString("category")
options, _ := cmd.Flags().GetString("options") options, _ := cmd.Flags().GetString("options")
maxBetTime, _ := cmd.Flags().GetString("maxBetTime")
maxBetHeight, _ := cmd.Flags().GetInt64("maxBetHeight") maxBetHeight, _ := cmd.Flags().GetInt64("maxBetHeight")
symbol, _ := cmd.Flags().GetString("symbol") maxBetsOneTime, _ := cmd.Flags().GetInt64("maxBetsOneTime")
exec, _ := cmd.Flags().GetString("exec")
maxBets, _ := cmd.Flags().GetInt64("maxBets")
maxBetsNumber, _ := cmd.Flags().GetInt64("maxBetsNumber") maxBetsNumber, _ := cmd.Flags().GetInt64("maxBetsNumber")
devFeeFactor, _ := cmd.Flags().GetInt64("devFeeFactor") devFeeFactor, _ := cmd.Flags().GetInt64("devFeeFactor")
devFeeAddr, _ := cmd.Flags().GetString("devFeeAddr") devFeeAddr, _ := cmd.Flags().GetString("devFeeAddr")
platFeeFactor, _ := cmd.Flags().GetInt64("platFeeFactor") platFeeFactor, _ := cmd.Flags().GetInt64("platFeeFactor")
platFeeAddr, _ := cmd.Flags().GetString("platFeeAddr") platFeeAddr, _ := cmd.Flags().GetString("platFeeAddr")
expire, _ := cmd.Flags().GetString("expire")
expireHeight, _ := cmd.Flags().GetInt64("expireHeight") expireHeight, _ := cmd.Flags().GetInt64("expireHeight")
fee, _ := cmd.Flags().GetFloat64("fee")
params := &pkt.GuessStartTxReq{ params := &pkt.GuessStartTxReq{
Topic: topic, Topic: topic,
Options: options, Options: options,
MaxBetTime: maxBetTime, Category: category,
MaxBetHeight: maxBetHeight, MaxBetHeight: maxBetHeight,
Symbol: symbol, MaxBetsOneTime:maxBetsOneTime * 1e8,
Exec: exec, MaxBetsNumber: maxBetsNumber * 1e8,
MaxBetsOneTime: maxBets,
MaxBetsNumber: maxBetsNumber,
DevFeeFactor: devFeeFactor, DevFeeFactor: devFeeFactor,
DevFeeAddr: devFeeAddr, DevFeeAddr: devFeeAddr,
PlatFeeFactor: platFeeFactor, PlatFeeFactor: platFeeFactor,
PlatFeeAddr: platFeeAddr, PlatFeeAddr: platFeeAddr,
Expire: expire,
ExpireHeight: expireHeight, ExpireHeight: expireHeight,
Fee: int64(fee * float64(1e8)),
} }
var res string var res string
...@@ -128,6 +123,7 @@ func addGuessBetFlags(cmd *cobra.Command) { ...@@ -128,6 +123,7 @@ func addGuessBetFlags(cmd *cobra.Command) {
cmd.MarkFlagRequired("option") cmd.MarkFlagRequired("option")
cmd.Flags().Int64P("betsNumber", "b", 1, "bets number for one option in a guess game") cmd.Flags().Int64P("betsNumber", "b", 1, "bets number for one option in a guess game")
cmd.MarkFlagRequired("betsNumber") cmd.MarkFlagRequired("betsNumber")
cmd.Flags().Float64P("fee", "f", 0.01, "tx fee")
} }
func guessBet(cmd *cobra.Command, args []string) { func guessBet(cmd *cobra.Command, args []string) {
...@@ -135,11 +131,13 @@ func guessBet(cmd *cobra.Command, args []string) { ...@@ -135,11 +131,13 @@ func guessBet(cmd *cobra.Command, args []string) {
gameId, _ := cmd.Flags().GetString("gameId") gameId, _ := cmd.Flags().GetString("gameId")
option, _ := cmd.Flags().GetString("option") option, _ := cmd.Flags().GetString("option")
betsNumber, _ := cmd.Flags().GetInt64("betsNumber") betsNumber, _ := cmd.Flags().GetInt64("betsNumber")
fee, _ := cmd.Flags().GetFloat64("fee")
params := &pkt.GuessBetTxReq{ params := &pkt.GuessBetTxReq{
GameId: gameId, GameId: gameId,
Option: option, Option: option,
Bets: betsNumber, Bets: betsNumber,
Fee: int64(fee * float64(1e8)),
} }
var res string var res string
...@@ -160,14 +158,16 @@ func GuessAbortRawTxCmd() *cobra.Command { ...@@ -160,14 +158,16 @@ func GuessAbortRawTxCmd() *cobra.Command {
func addGuessAbortFlags(cmd *cobra.Command) { func addGuessAbortFlags(cmd *cobra.Command) {
cmd.Flags().StringP("gameId", "g", "", "game Id") cmd.Flags().StringP("gameId", "g", "", "game Id")
cmd.MarkFlagRequired("gameId") cmd.MarkFlagRequired("gameId")
cmd.Flags().Float64P("fee", "f", 0.01, "tx fee")
} }
func guessAbort(cmd *cobra.Command, args []string) { func guessAbort(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
gameId, _ := cmd.Flags().GetString("gameId") gameId, _ := cmd.Flags().GetString("gameId")
fee, _ := cmd.Flags().GetFloat64("fee")
params := &pkt.GuessAbortTxReq{ params := &pkt.GuessAbortTxReq{
GameId: gameId, GameId: gameId,
Fee: int64(fee * float64(1e8)),
} }
var res string var res string
...@@ -191,16 +191,20 @@ func addGuessPublishFlags(cmd *cobra.Command) { ...@@ -191,16 +191,20 @@ func addGuessPublishFlags(cmd *cobra.Command) {
cmd.Flags().StringP("result", "r", "", "result of a guess game") cmd.Flags().StringP("result", "r", "", "result of a guess game")
cmd.MarkFlagRequired("result") cmd.MarkFlagRequired("result")
cmd.Flags().Float64P("fee", "f", 0.01, "tx fee")
} }
func guessPublish(cmd *cobra.Command, args []string) { func guessPublish(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr") rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
gameId, _ := cmd.Flags().GetString("gameId") gameId, _ := cmd.Flags().GetString("gameId")
result, _ := cmd.Flags().GetString("result") result, _ := cmd.Flags().GetString("result")
fee, _ := cmd.Flags().GetFloat64("fee")
params := &pkt.GuessPublishTxReq{ params := &pkt.GuessPublishTxReq{
GameId: gameId, GameId: gameId,
Result: result, Result: result,
Fee: int64(fee * float64(1e8)),
} }
var res string var res string
...@@ -220,7 +224,7 @@ func GuessQueryRawTxCmd() *cobra.Command { ...@@ -220,7 +224,7 @@ func GuessQueryRawTxCmd() *cobra.Command {
} }
func addGuessQueryFlags(cmd *cobra.Command) { func addGuessQueryFlags(cmd *cobra.Command) {
cmd.Flags().Int32P("type", "t", 1, "query type, 1:QueryGamesByIds,2:QueryGameById,3:QueryGameByAddr,4:QueryGameByAddrStatus,5:QueryGameByStatus,6:QueryGameByAdminAddr,7:QueryGameByAddrStatusAddr,8:QueryGameByAdminStatusAddr,9:QueryGameByCategoryStatusAddr") cmd.Flags().Int32P("type", "t", 1, "query type, 1:Ids,2:Id,3:Addr,4:Status,5:AdminAddr,6:AddrStatus,7:AdminStatus,8:CategoryStatus")
cmd.Flags().StringP("gameId", "g", "", "game Id") cmd.Flags().StringP("gameId", "g", "", "game Id")
cmd.Flags().StringP("addr", "a", "", "address") cmd.Flags().StringP("addr", "a", "", "address")
cmd.Flags().StringP("adminAddr", "m", "", "admin address") cmd.Flags().StringP("adminAddr", "m", "", "admin address")
......
...@@ -25,9 +25,12 @@ const ( ...@@ -25,9 +25,12 @@ const (
ListASC = int32(1) ListASC = int32(1)
DefaultCount = int32(20) //默认一次取多少条记录 DefaultCount = int32(20) //默认一次取多少条记录
DefaultCategory= "default"
MaxBetsOneTime = 10000e8 //一次最多下多少注 MaxBetsOneTime = 10000e8 //一次最多下多少注
MaxBetsNumber = 10000000e8 //一局游戏最多接受多少注 MaxBetsNumber = 10000000e8 //一局游戏最多接受多少注
MaxBetHeight = 10000000000 //最大区块高度 MaxBetHeight = 1000000 //距离游戏创建区块的最大可下注高度差
MaxExpireHeight = 1000000 //距离游戏创建区块的最大过期高度差
MinBetBlockNum = 720 //从创建游戏开始,一局游戏最少的可下注区块数量 MinBetBlockNum = 720 //从创建游戏开始,一局游戏最少的可下注区块数量
MinBetTimeInterval = "2h" //从创建游戏开始,一局游戏最短的可下注时间 MinBetTimeInterval = "2h" //从创建游戏开始,一局游戏最短的可下注时间
...@@ -59,7 +62,12 @@ func NewAction(guess *Guess, tx *types.Transaction, index int) *Action { ...@@ -59,7 +62,12 @@ func NewAction(guess *Guess, tx *types.Transaction, index int) *Action {
fromAddr := tx.From() fromAddr := tx.From()
msgRecvOp := grpc.WithMaxMsgSize(grpcRecSize) msgRecvOp := grpc.WithMaxMsgSize(grpcRecSize)
conn, err := grpc.Dial(cfg.ParaRemoteGrpcClient, grpc.WithInsecure(), msgRecvOp) paraRemoteGrpcClient := types.Conf("config.consensus").GStr("ParaRemoteGrpcClient")
if types.IsPara() && paraRemoteGrpcClient == "" {
panic("ParaRemoteGrpcClient error")
}
conn, err := grpc.Dial(paraRemoteGrpcClient, grpc.WithInsecure(), msgRecvOp)
if err != nil { if err != nil {
panic(err) panic(err)
...@@ -341,17 +349,13 @@ func (action *Action) newGame(gameId string, start *pkt.GuessGameStart) (*pkt.Gu ...@@ -341,17 +349,13 @@ func (action *Action) newGame(gameId string, start *pkt.GuessGameStart) (*pkt.Gu
Topic: start.Topic, Topic: start.Topic,
Category: start.Category, Category: start.Category,
Options: start.Options, Options: start.Options,
MaxBetTime: start.MaxBetTime,
MaxBetHeight: start.MaxBetHeight, MaxBetHeight: start.MaxBetHeight,
Symbol: start.Symbol,
Exec: start.Exec,
MaxBetsOneTime: start.MaxBetsOneTime, MaxBetsOneTime: start.MaxBetsOneTime,
MaxBetsNumber: start.MaxBetsNumber, MaxBetsNumber: start.MaxBetsNumber,
DevFeeFactor: start.DevFeeFactor, DevFeeFactor: start.DevFeeFactor,
DevFeeAddr: start.DevFeeAddr, DevFeeAddr: start.DevFeeAddr,
PlatFeeFactor: start.PlatFeeFactor, PlatFeeFactor: start.PlatFeeFactor,
PlatFeeAddr: start.PlatFeeAddr, PlatFeeAddr: start.PlatFeeAddr,
Expire: start.Expire,
ExpireHeight: start.ExpireHeight, ExpireHeight: start.ExpireHeight,
//AdminAddr: action.fromaddr, //AdminAddr: action.fromaddr,
BetsNumber: 0, BetsNumber: 0,
...@@ -369,7 +373,13 @@ func (action *Action) GameStart(start *pkt.GuessGameStart) (*types.Receipt, erro ...@@ -369,7 +373,13 @@ func (action *Action) GameStart(start *pkt.GuessGameStart) (*types.Receipt, erro
if start.MaxBetHeight >= MaxBetHeight { if start.MaxBetHeight >= MaxBetHeight {
logger.Error("GameStart", "addr", action.fromaddr, "execaddr", action.execaddr, logger.Error("GameStart", "addr", action.fromaddr, "execaddr", action.execaddr,
"err", fmt.Sprintf("The maximum height number is %d which is less thanstart.MaxHeight %d", MaxBetHeight, start.MaxBetHeight)) "err", fmt.Sprintf("The maximum height diff number is %d which is less than start.MaxBetHeight %d", MaxBetHeight, start.MaxBetHeight))
return nil, types.ErrInvalidParam
}
if start.ExpireHeight >= MaxExpireHeight {
logger.Error("GameStart", "addr", action.fromaddr, "execaddr", action.execaddr,
"err", fmt.Sprintf("The maximum height diff number is %d which is less than start.MaxBetHeight %d", MaxBetHeight, start.MaxBetHeight))
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
...@@ -394,16 +404,12 @@ func (action *Action) GameStart(start *pkt.GuessGameStart) (*types.Receipt, erro ...@@ -394,16 +404,12 @@ func (action *Action) GameStart(start *pkt.GuessGameStart) (*types.Receipt, erro
if !action.CheckTime(start) { if !action.CheckTime(start) {
logger.Error("GameStart", "addr", action.fromaddr, "execaddr", action.execaddr, logger.Error("GameStart", "addr", action.fromaddr, "execaddr", action.execaddr,
"err", fmt.Sprintf("The height and time parameters are illegal:MaxTime %s MaxHeight %d Expire %s, ExpireHeight %d", start.MaxBetTime, start.MaxBetHeight, start.Expire, start.ExpireHeight)) "err", fmt.Sprintf("The height and time parameters are illegal:MaxHeight %d ,ExpireHeight %d", start.MaxBetHeight, start.ExpireHeight))
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
if len(start.Symbol) == 0 { if len(start.Category) == 0 {
start.Symbol = "bty" start.Category = DefaultCategory
}
if len(start.Exec) == 0 {
start.Exec = "coins"
} }
if start.MaxBetsOneTime >= MaxBetsOneTime { if start.MaxBetsOneTime >= MaxBetsOneTime {
...@@ -413,6 +419,16 @@ func (action *Action) GameStart(start *pkt.GuessGameStart) (*types.Receipt, erro ...@@ -413,6 +419,16 @@ func (action *Action) GameStart(start *pkt.GuessGameStart) (*types.Receipt, erro
gameId := common.ToHex(action.txhash) gameId := common.ToHex(action.txhash)
game, _ := action.newGame(gameId, start) game, _ := action.newGame(gameId, start)
game.StartTime = action.blocktime game.StartTime = action.blocktime
if types.IsPara() {
mainHeight := action.GetMainHeightByTxHash(action.txhash)
if mainHeight < 0 {
logger.Error("GameStart", "mainHeight", mainHeight)
return nil, pkt.ErrGuessStatus
}
game.StartHeight = mainHeight
} else {
game.StartHeight = action.height
}
game.AdminAddr = action.fromaddr game.AdminAddr = action.fromaddr
game.PreIndex = 0 game.PreIndex = 0
game.Index = action.getIndex() game.Index = action.getIndex()
...@@ -491,7 +507,7 @@ func (action *Action) GameBet(pbBet *pkt.GuessGameBet) (*types.Receipt, error) { ...@@ -491,7 +507,7 @@ func (action *Action) GameBet(pbBet *pkt.GuessGameBet) (*types.Receipt, error) {
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
// 检查余额账户余额 // 检查账户余额
checkValue := pbBet.BetsNum checkValue := pbBet.BetsNum
if !action.CheckExecAccountBalance(action.fromaddr, checkValue, 0) { if !action.CheckExecAccountBalance(action.fromaddr, checkValue, 0) {
logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "id", logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "id",
...@@ -507,18 +523,16 @@ func (action *Action) GameBet(pbBet *pkt.GuessGameBet) (*types.Receipt, error) { ...@@ -507,18 +523,16 @@ func (action *Action) GameBet(pbBet *pkt.GuessGameBet) (*types.Receipt, error) {
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) kv = append(kv, receipt.KV...)
//如果当前游戏状态可以下注,统一设定游戏状态为GuessGameStatusBet
action.ChangeStatus(game, pkt.GuessGameStatusBet)
action.AddGuessBet(game, pbBet)
var receiptLog *types.ReceiptLog var receiptLog *types.ReceiptLog
if prevStatus != game.Status { if prevStatus != pkt.GuessGameStatusBet {
//状态发生变化,更新所有addr对应记录的index action.ChangeStatus(game, pkt.GuessGameStatusBet)
action.ChangeAllAddrIndex(game) action.AddGuessBet(game, pbBet)
receiptLog = action.GetReceiptLog(game, true) receiptLog = action.GetReceiptLog(game, true)
} else { } else {
action.AddGuessBet(game, pbBet)
receiptLog = action.GetReceiptLog(game, false) receiptLog = action.GetReceiptLog(game, false)
} }
logs = append(logs, receiptLog) logs = append(logs, receiptLog)
kv = append(kv, action.saveGame(game)...) kv = append(kv, action.saveGame(game)...)
...@@ -838,16 +852,36 @@ func (action *Action) ChangeAllAddrIndex(game *pkt.GuessGame) { ...@@ -838,16 +852,36 @@ func (action *Action) ChangeAllAddrIndex(game *pkt.GuessGame) {
} }
func (action *Action) RefreshStatusByTime(game *pkt.GuessGame) (canBet bool) { func (action *Action) RefreshStatusByTime(game *pkt.GuessGame) (canBet bool) {
//如果完全由管理员驱动状态变化,则不需要做如下判断保护。
var mainHeight int64
if types.IsPara() {
mainHeight = action.GetMainHeightByTxHash(action.txhash)
if mainHeight < 0 {
logger.Error("RefreshStatusByTime", "mainHeight err", mainHeight)
return true
}
} else {
mainHeight = action.height
}
//如果完全由管理员驱动状态变化,则除了保护性过期判断外,不需要做其他判断。
if game.DrivenByAdmin { if game.DrivenByAdmin {
if (mainHeight - game.StartHeight) >= game.ExpireHeight {
action.ChangeStatus(game, pkt.GuessGameStatusTimeOut)
canBet = false
return canBet
}
return true return true
} }
// 检查区块高度是否超过最大下注高度限制,看是否可以下注 // 检查区块高度是否超过最大可下注高度限制,看是否可以下注
if game.GetMaxBetHeight() <= action.height { heightDiff := mainHeight - game.StartHeight
if heightDiff >= game.MaxBetHeight {
logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "Height over limit", logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "Height over limit",
action.height, "MaxHeight", game.GetMaxBetHeight()) mainHeight, "startHeight", game.StartHeight, "MaxHeightDiff", game.GetMaxBetHeight())
if game.GetExpireHeight() > action.height { if game.ExpireHeight > heightDiff {
action.ChangeStatus(game, pkt.GuessGameStatusStopBet) action.ChangeStatus(game, pkt.GuessGameStatusStopBet)
} else { } else {
action.ChangeStatus(game, pkt.GuessGameStatusTimeOut) action.ChangeStatus(game, pkt.GuessGameStatusTimeOut)
...@@ -857,84 +891,29 @@ func (action *Action) RefreshStatusByTime(game *pkt.GuessGame) (canBet bool) { ...@@ -857,84 +891,29 @@ func (action *Action) RefreshStatusByTime(game *pkt.GuessGame) (canBet bool) {
return canBet return canBet
} }
// 检查区块高度是否超过下注时间限制,看是否可以下注
if len(game.GetMaxBetTime()) > 0 {
tMax, err := time.Parse("2006-01-02 15:04:05", game.GetMaxBetTime())
if err != nil {
logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "Parse MaxTime failed",
game.GetMaxBetTime())
canBet = true
return canBet
}
tExpire, err := time.Parse("2006-01-02 15:04:05", game.GetExpire())
if err != nil {
logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "Parse Expire failed",
game.GetExpire())
canBet = true
return canBet
}
tNow := time.Now()
if tNow.After(tMax) {
logger.Error("GameBet", "addr", action.fromaddr, "execaddr", action.execaddr, "Time over MaxTime",
game.GetMaxBetTime())
if tNow.After(tExpire) {
action.ChangeStatus(game, pkt.GuessGameStatusTimeOut)
} else {
action.ChangeStatus(game, pkt.GuessGameStatusStopBet)
}
canBet = false
return canBet
}
}
canBet = true canBet = true
return canBet return canBet
} }
func (action *Action) CheckTime(start *pkt.GuessGameStart) bool { func (action *Action) CheckTime(start *pkt.GuessGameStart) bool {
if len(start.MaxBetTime) == 0 && len(start.Expire) == 0 && start.MaxBetHeight == 0 && start.ExpireHeight == 0 { if start.MaxBetHeight == 0 && start.ExpireHeight == 0 {
//如果上述字段都不携带,则认为完全由admin的指令驱动。 //如果上述字段都不携带,则认为完全由admin的指令驱动。
start.DrivenByAdmin = true start.DrivenByAdmin = true
return true
}
if action.height + MinBetBlockNum > start.MaxBetHeight || start.MaxBetHeight + MinBetTimeoutNum > start.ExpireHeight {
return false
}
tNow := time.Now()
d1, _ := time.ParseDuration(MinBetTimeInterval) //最短开奖时间
d2, _ := time.ParseDuration(MinBetTimeoutInterval) //最短游戏过期时间
if len(start.GetMaxBetTime()) == 0 {
tNow.Add(d1)
start.MaxBetTime = tNow.Format("2006-01-02 15:04:05")
}
if len(start.GetExpire()) == 0 { //依然设定最大过期高度差,作为最后的保护
tMax, _ := time.Parse("2006-01-02 15:04:05", start.GetMaxBetTime()) start.ExpireHeight = MaxExpireHeight
tMax.Add(d2) return true
start.Expire = tMax.Format("2006-01-02 15:04:05")
} }
tMax, err := time.Parse("2006-01-02 15:04:05", start.GetMaxBetTime()) if start.MaxBetHeight == 0 {
if err != nil { start.MaxBetHeight = MaxBetHeight
logger.Error("CheckTime", "addr", action.fromaddr, "execaddr", action.execaddr, "Parse MaxTime failed",
start.GetMaxBetTime())
return false
} }
tExpire, err := time.Parse("2006-01-02 15:04:05", start.GetExpire()) if start.ExpireHeight == 0 {
if err != nil { start.ExpireHeight = MaxExpireHeight
logger.Error("CheckTime", "addr", action.fromaddr, "execaddr", action.execaddr, "Parse Expire failed",
start.GetExpire())
return false
} }
if tMax.After(tNow.Add(d1)) && tExpire.After(tMax.Add(d2)){ if start.MaxBetHeight <= start.ExpireHeight {
return true return true
} }
......
...@@ -7,33 +7,30 @@ package types; ...@@ -7,33 +7,30 @@ package types;
//竞猜游戏内容 //竞猜游戏内容
message GuessGame { message GuessGame {
string gameId = 1; //游戏ID string gameId = 1; //游戏ID
int32 status = 2; //游戏的状态:创建->投注->截止投注->开奖 int32 status = 2; //游戏的状态:创建->投注->截止投注->开奖
int32 preStatus = 3; int32 preStatus = 3;
int64 startTime = 4; //创建游戏的时间 int64 startTime = 4; //创建游戏的时间
string startTxHash = 5; //创建游戏的交易hash int64 startHeight = 5; //创建游戏的时间
string topic = 6; //主题 string startTxHash = 6; //创建游戏的交易hash
string category = 7; //分类 string topic = 7; //主题
string options = 8; //选项 string category = 8; //分类
string maxBetTime = 9; //截止下注时间 string options = 9; //选项
int64 maxBetHeight = 10; //截止下注的块高 int64 maxBetHeight = 10; //截止下注的块高
string symbol = 11; //bty或者具体token int64 maxBetsOneTime = 11; //单次可以下多少注,默认100
string exec = 12; //coins或者token int64 maxBetsNumber = 12; //最多可以下多少注
int64 maxBetsOneTime= 14; //单次可以下多少注,默认100 int64 devFeeFactor = 13; //开发者抽成比例
int64 maxBetsNumber = 15; //最多可以下多少注 string devFeeAddr = 14; //开发者地址
int64 devFeeFactor = 16; //开发者抽成比例 int64 platFeeFactor = 15; //平台抽成比例
string devFeeAddr = 17; //开发者地址 string platFeeAddr = 16; //平台地址
int64 platFeeFactor = 18; //平台抽成比例 int64 expireHeight = 17; //游戏过期区块高度
string platFeeAddr = 19; //平台地址 string adminAddr = 18; //游戏创建者地址,只有该地址可以开奖
string expire = 20; //游戏过期时间 int64 betsNumber = 19; //已下注数,如果数量达到maxBetsNumber,则不允许再下注
int64 expireHeight = 21; //游戏过期区块高度 repeated GuessPlayer plays = 20; //参与游戏下注的玩家投注信息
string adminAddr = 22; //游戏创建者地址,只有该地址可以开奖 string result = 21; //公布的中奖结果
int64 betsNumber = 23; //已下注数,如果数量达到maxBetsNumber,则不允许再下注 GuessBetStat betStat = 22;
repeated GuessPlayer plays = 24; //参与游戏下注的玩家投注信息 int64 index = 23;
string result = 25; //公布的中奖结果 int64 preIndex = 24;
GuessBetStat betStat = 26; bool drivenByAdmin = 25;
int64 index = 27;
int64 preIndex = 28;
bool drivenByAdmin = 29;
} }
message GuessPlayer { message GuessPlayer {
...@@ -78,21 +75,17 @@ message GuessGameAction { ...@@ -78,21 +75,17 @@ message GuessGameAction {
//游戏启动 //游戏启动
message GuessGameStart{ message GuessGameStart{
string topic = 1; string topic = 1;
string options = 2; string options = 2;
string category = 3; string category = 3;
string maxBetTime = 4; int64 maxBetHeight = 4;
int64 maxBetHeight = 5; int64 maxBetsOneTime= 5;
string symbol = 6; int64 maxBetsNumber = 6;
string exec = 7; int64 devFeeFactor = 7; //开发者抽成比例
int64 maxBetsOneTime= 9; string devFeeAddr = 8; //开发者地址
int64 maxBetsNumber = 10; int64 platFeeFactor = 9; //平台抽成比例
int64 devFeeFactor = 11; //开发者抽成比例 string platFeeAddr = 10; //平台地址
string devFeeAddr = 12; //开发者地址 int64 expireHeight = 11;
int64 platFeeFactor = 13; //平台抽成比例 bool drivenByAdmin = 12;
string platFeeAddr = 14; //平台地址
string expire = 15;
int64 expireHeight = 16;
bool drivenByAdmin = 17;
} }
//参与游戏下注 //参与游戏下注
...@@ -161,35 +154,35 @@ message ReceiptGuessGame { ...@@ -161,35 +154,35 @@ message ReceiptGuessGame {
message GuessStartTxReq { message GuessStartTxReq {
string topic = 1; string topic = 1;
string options = 2; string options = 2;
int64 startTime = 3; string category = 3;
string maxBetTime = 4; int64 maxHeight = 4;
int64 maxBetHeight = 5; int64 maxBetHeight = 5;
string symbol = 6; int64 maxBetsOneTime = 6;
string exec = 7; int64 maxBetsNumber = 7;
int64 maxBetsOneTime = 8; int64 devFeeFactor = 8;
int64 maxBetsNumber = 9; string devFeeAddr = 9;
int64 devFeeFactor = 10; int64 platFeeFactor = 10;
string devFeeAddr = 11; string platFeeAddr = 11;
int64 platFeeFactor = 12; int64 expireHeight = 12;
string platFeeAddr = 13; int64 fee = 13;
string feeAddr = 14;
string expire = 15;
int64 expireHeight = 16;
} }
message GuessBetTxReq { message GuessBetTxReq {
string gameId = 1; string gameId = 1;
string option = 2; string option = 2;
int64 bets = 3; int64 bets = 3;
int64 fee = 4;
} }
message GuessAbortTxReq { message GuessAbortTxReq {
string gameId = 1; string gameId = 1;
int64 fee = 2;
} }
message GuessPublishTxReq { message GuessPublishTxReq {
string gameId = 1; string gameId = 1;
string result = 2; string result = 2;
int64 fee = 3;
} }
// 索引value值 // 索引value值
......
...@@ -16,24 +16,8 @@ func (c *Jrpc) GuessStartTx(parm *pb.GuessStartTxReq, result *interface{}) error ...@@ -16,24 +16,8 @@ func (c *Jrpc) GuessStartTx(parm *pb.GuessStartTxReq, result *interface{}) error
if parm == nil { if parm == nil {
return types.ErrInvalidParam return types.ErrInvalidParam
} }
head := &pb.GuessGameStart{
Topic: parm.Topic,
Options: parm.Options,
MaxBetTime: parm.MaxBetTime,
MaxBetHeight: parm.MaxBetHeight,
Symbol: parm.Symbol,
Exec: parm.Exec,
MaxBetsOneTime: parm.MaxBetsOneTime,
MaxBetsNumber: parm.MaxBetsNumber,
DevFeeFactor: parm.DevFeeFactor,
DevFeeAddr: parm.DevFeeAddr,
PlatFeeFactor: parm.PlatFeeFactor,
PlatFeeAddr: parm.PlatFeeAddr,
Expire: parm.Expire,
ExpireHeight: parm.ExpireHeight,
}
reply, err := c.cli.GuessStart(context.Background(), head) reply, err := c.cli.GuessStart(context.Background(), parm)
if err != nil { if err != nil {
return err return err
} }
...@@ -46,13 +30,7 @@ func (c *Jrpc) GuessBetTx(parm *pb.GuessBetTxReq, result *interface{}) error { ...@@ -46,13 +30,7 @@ func (c *Jrpc) GuessBetTx(parm *pb.GuessBetTxReq, result *interface{}) error {
return types.ErrInvalidParam return types.ErrInvalidParam
} }
head := &pb.GuessGameBet{ reply, err := c.cli.GuessBet(context.Background(), parm)
GameId: parm.GameId,
Option: parm.Option,
BetsNum: parm.Bets,
}
reply, err := c.cli.GuessBet(context.Background(), head)
if err != nil { if err != nil {
return err return err
} }
...@@ -66,10 +44,7 @@ func (c *Jrpc) GuessAbortTx(parm *pb.GuessAbortTxReq, result *interface{}) error ...@@ -66,10 +44,7 @@ func (c *Jrpc) GuessAbortTx(parm *pb.GuessAbortTxReq, result *interface{}) error
return types.ErrInvalidParam return types.ErrInvalidParam
} }
head := &pb.GuessGameAbort{ reply, err := c.cli.GuessAbort(context.Background(), parm)
GameId: parm.GameId,
}
reply, err := c.cli.GuessAbort(context.Background(), head)
if err != nil { if err != nil {
return err return err
} }
...@@ -83,11 +58,7 @@ func (c *Jrpc) GuessPublishTx(parm *pb.GuessPublishTxReq, result *interface{}) e ...@@ -83,11 +58,7 @@ func (c *Jrpc) GuessPublishTx(parm *pb.GuessPublishTxReq, result *interface{}) e
return types.ErrInvalidParam return types.ErrInvalidParam
} }
head := &pb.GuessGamePublish{ reply, err := c.cli.GuessPublish(context.Background(), parm)
GameId: parm.GameId,
Result: parm.Result,
}
reply, err := c.cli.GuessPublish(context.Background(), head)
if err != nil { if err != nil {
return err return err
} }
......
...@@ -6,16 +6,40 @@ package rpc ...@@ -6,16 +6,40 @@ package rpc
import ( import (
"context" "context"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
pb "github.com/33cn/plugin/plugin/dapp/guess/types" pb "github.com/33cn/plugin/plugin/dapp/guess/types"
) )
func (c *channelClient) GuessStart(ctx context.Context, head *pb.GuessGameStart) (*types.UnsignTx, error) { func (c *channelClient) GuessStart(ctx context.Context, parm *pb.GuessStartTxReq) (*types.UnsignTx, error) {
v := &pb.GuessGameStart{
Topic: parm.Topic,
Options: parm.Options,
Category: parm.Category,
MaxBetHeight: parm.MaxBetHeight,
MaxBetsOneTime: parm.MaxBetsOneTime,
MaxBetsNumber: parm.MaxBetsNumber,
DevFeeFactor: parm.DevFeeFactor,
DevFeeAddr: parm.DevFeeAddr,
PlatFeeFactor: parm.PlatFeeFactor,
PlatFeeAddr: parm.PlatFeeAddr,
ExpireHeight: parm.ExpireHeight,
}
val := &pb.GuessGameAction{ val := &pb.GuessGameAction{
Ty: pb.GuessGameActionStart, Ty: pb.GuessGameActionStart,
Value: &pb.GuessGameAction_Start{head}, Value: &pb.GuessGameAction_Start{v},
} }
tx, err := types.CreateFormatTx(pb.GuessX, types.Encode(val))
name := types.ExecName(pb.GuessX)
tx := &types.Transaction{
Execer: []byte(types.ExecName(pb.GuessX)),
Payload: types.Encode(val),
Fee: parm.Fee,
To: address.ExecAddress(name),
}
tx, err := types.FormatTx(name, tx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -23,12 +47,27 @@ func (c *channelClient) GuessStart(ctx context.Context, head *pb.GuessGameStart) ...@@ -23,12 +47,27 @@ func (c *channelClient) GuessStart(ctx context.Context, head *pb.GuessGameStart)
return &types.UnsignTx{Data: data}, nil return &types.UnsignTx{Data: data}, nil
} }
func (c *channelClient) GuessBet(ctx context.Context, head *pb.GuessGameBet) (*types.UnsignTx, error) { func (c *channelClient) GuessBet(ctx context.Context, parm *pb.GuessBetTxReq) (*types.UnsignTx, error) {
v := &pb.GuessGameBet{
GameId: parm.GameId,
Option: parm.Option,
BetsNum: parm.Bets,
}
val := &pb.GuessGameAction{ val := &pb.GuessGameAction{
Ty: pb.GuessGameActionBet, Ty: pb.GuessGameActionBet,
Value: &pb.GuessGameAction_Bet{head}, Value: &pb.GuessGameAction_Bet{v},
} }
tx, err := types.CreateFormatTx(pb.GuessX, types.Encode(val))
name := types.ExecName(pb.GuessX)
tx := &types.Transaction{
Execer: []byte(types.ExecName(pb.GuessX)),
Payload: types.Encode(val),
Fee: parm.Fee,
To: address.ExecAddress(name),
}
tx, err := types.FormatTx(name, tx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -36,12 +75,24 @@ func (c *channelClient) GuessBet(ctx context.Context, head *pb.GuessGameBet) (*t ...@@ -36,12 +75,24 @@ func (c *channelClient) GuessBet(ctx context.Context, head *pb.GuessGameBet) (*t
return &types.UnsignTx{Data: data}, nil return &types.UnsignTx{Data: data}, nil
} }
func (c *channelClient) GuessAbort(ctx context.Context, head *pb.GuessGameAbort) (*types.UnsignTx, error) { func (c *channelClient) GuessAbort(ctx context.Context, parm *pb.GuessAbortTxReq) (*types.UnsignTx, error) {
v := &pb.GuessGameAbort{
GameId: parm.GameId,
}
val := &pb.GuessGameAction{ val := &pb.GuessGameAction{
Ty: pb.GuessGameActionAbort, Ty: pb.GuessGameActionAbort,
Value: &pb.GuessGameAction_Abort{head}, Value: &pb.GuessGameAction_Abort{v},
} }
tx, err := types.CreateFormatTx(pb.GuessX, types.Encode(val)) name := types.ExecName(pb.GuessX)
tx := &types.Transaction{
Execer: []byte(types.ExecName(pb.GuessX)),
Payload: types.Encode(val),
Fee: parm.Fee,
To: address.ExecAddress(name),
}
tx, err := types.FormatTx(name, tx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -49,12 +100,26 @@ func (c *channelClient) GuessAbort(ctx context.Context, head *pb.GuessGameAbort) ...@@ -49,12 +100,26 @@ func (c *channelClient) GuessAbort(ctx context.Context, head *pb.GuessGameAbort)
return &types.UnsignTx{Data: data}, nil return &types.UnsignTx{Data: data}, nil
} }
func (c *channelClient) GuessPublish(ctx context.Context, head *pb.GuessGamePublish) (*types.UnsignTx, error) { func (c *channelClient) GuessPublish(ctx context.Context, parm *pb.GuessPublishTxReq) (*types.UnsignTx, error) {
v := &pb.GuessGamePublish{
GameId: parm.GameId,
Result: parm.Result,
}
val := &pb.GuessGameAction{ val := &pb.GuessGameAction{
Ty: pb.GuessGameActionPublish, Ty: pb.GuessGameActionPublish,
Value: &pb.GuessGameAction_Publish{head}, Value: &pb.GuessGameAction_Publish{v},
} }
tx, err := types.CreateFormatTx(pb.GuessX, types.Encode(val))
name := types.ExecName(pb.GuessX)
tx := &types.Transaction{
Execer: []byte(types.ExecName(pb.GuessX)),
Payload: types.Encode(val),
Fee: parm.Fee,
To: address.ExecAddress(name),
}
tx, err := types.FormatTx(name, tx)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -29,30 +29,27 @@ type GuessGame struct { ...@@ -29,30 +29,27 @@ type GuessGame struct {
Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"`
PreStatus int32 `protobuf:"varint,3,opt,name=preStatus,proto3" json:"preStatus,omitempty"` PreStatus int32 `protobuf:"varint,3,opt,name=preStatus,proto3" json:"preStatus,omitempty"`
StartTime int64 `protobuf:"varint,4,opt,name=startTime,proto3" json:"startTime,omitempty"` StartTime int64 `protobuf:"varint,4,opt,name=startTime,proto3" json:"startTime,omitempty"`
StartTxHash string `protobuf:"bytes,5,opt,name=startTxHash,proto3" json:"startTxHash,omitempty"` StartHeight int64 `protobuf:"varint,5,opt,name=startHeight,proto3" json:"startHeight,omitempty"`
Topic string `protobuf:"bytes,6,opt,name=topic,proto3" json:"topic,omitempty"` StartTxHash string `protobuf:"bytes,6,opt,name=startTxHash,proto3" json:"startTxHash,omitempty"`
Category string `protobuf:"bytes,7,opt,name=category,proto3" json:"category,omitempty"` Topic string `protobuf:"bytes,7,opt,name=topic,proto3" json:"topic,omitempty"`
Options string `protobuf:"bytes,8,opt,name=options,proto3" json:"options,omitempty"` Category string `protobuf:"bytes,8,opt,name=category,proto3" json:"category,omitempty"`
MaxBetTime string `protobuf:"bytes,9,opt,name=maxBetTime,proto3" json:"maxBetTime,omitempty"` Options string `protobuf:"bytes,9,opt,name=options,proto3" json:"options,omitempty"`
MaxBetHeight int64 `protobuf:"varint,10,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"` MaxBetHeight int64 `protobuf:"varint,10,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"`
Symbol string `protobuf:"bytes,11,opt,name=symbol,proto3" json:"symbol,omitempty"` MaxBetsOneTime int64 `protobuf:"varint,11,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"`
Exec string `protobuf:"bytes,12,opt,name=exec,proto3" json:"exec,omitempty"` MaxBetsNumber int64 `protobuf:"varint,12,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"`
MaxBetsOneTime int64 `protobuf:"varint,14,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"` DevFeeFactor int64 `protobuf:"varint,13,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"`
MaxBetsNumber int64 `protobuf:"varint,15,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"` DevFeeAddr string `protobuf:"bytes,14,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"`
DevFeeFactor int64 `protobuf:"varint,16,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"` PlatFeeFactor int64 `protobuf:"varint,15,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"`
DevFeeAddr string `protobuf:"bytes,17,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"` PlatFeeAddr string `protobuf:"bytes,16,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
PlatFeeFactor int64 `protobuf:"varint,18,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"` ExpireHeight int64 `protobuf:"varint,17,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
PlatFeeAddr string `protobuf:"bytes,19,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"` AdminAddr string `protobuf:"bytes,18,opt,name=adminAddr,proto3" json:"adminAddr,omitempty"`
Expire string `protobuf:"bytes,20,opt,name=expire,proto3" json:"expire,omitempty"` BetsNumber int64 `protobuf:"varint,19,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"`
ExpireHeight int64 `protobuf:"varint,21,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"` Plays []*GuessPlayer `protobuf:"bytes,20,rep,name=plays,proto3" json:"plays,omitempty"`
AdminAddr string `protobuf:"bytes,22,opt,name=adminAddr,proto3" json:"adminAddr,omitempty"` Result string `protobuf:"bytes,21,opt,name=result,proto3" json:"result,omitempty"`
BetsNumber int64 `protobuf:"varint,23,opt,name=betsNumber,proto3" json:"betsNumber,omitempty"` BetStat *GuessBetStat `protobuf:"bytes,22,opt,name=betStat,proto3" json:"betStat,omitempty"`
Plays []*GuessPlayer `protobuf:"bytes,24,rep,name=plays,proto3" json:"plays,omitempty"` Index int64 `protobuf:"varint,23,opt,name=index,proto3" json:"index,omitempty"`
Result string `protobuf:"bytes,25,opt,name=result,proto3" json:"result,omitempty"` PreIndex int64 `protobuf:"varint,24,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
BetStat *GuessBetStat `protobuf:"bytes,26,opt,name=betStat,proto3" json:"betStat,omitempty"` DrivenByAdmin bool `protobuf:"varint,25,opt,name=drivenByAdmin,proto3" json:"drivenByAdmin,omitempty"`
Index int64 `protobuf:"varint,27,opt,name=index,proto3" json:"index,omitempty"`
PreIndex int64 `protobuf:"varint,28,opt,name=preIndex,proto3" json:"preIndex,omitempty"`
DrivenByAdmin bool `protobuf:"varint,29,opt,name=drivenByAdmin,proto3" json:"drivenByAdmin,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:"-"`
...@@ -111,6 +108,13 @@ func (m *GuessGame) GetStartTime() int64 { ...@@ -111,6 +108,13 @@ func (m *GuessGame) GetStartTime() int64 {
return 0 return 0
} }
func (m *GuessGame) GetStartHeight() int64 {
if m != nil {
return m.StartHeight
}
return 0
}
func (m *GuessGame) GetStartTxHash() string { func (m *GuessGame) GetStartTxHash() string {
if m != nil { if m != nil {
return m.StartTxHash return m.StartTxHash
...@@ -139,13 +143,6 @@ func (m *GuessGame) GetOptions() string { ...@@ -139,13 +143,6 @@ func (m *GuessGame) GetOptions() string {
return "" return ""
} }
func (m *GuessGame) GetMaxBetTime() string {
if m != nil {
return m.MaxBetTime
}
return ""
}
func (m *GuessGame) GetMaxBetHeight() int64 { func (m *GuessGame) GetMaxBetHeight() int64 {
if m != nil { if m != nil {
return m.MaxBetHeight return m.MaxBetHeight
...@@ -153,20 +150,6 @@ func (m *GuessGame) GetMaxBetHeight() int64 { ...@@ -153,20 +150,6 @@ func (m *GuessGame) GetMaxBetHeight() int64 {
return 0 return 0
} }
func (m *GuessGame) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
func (m *GuessGame) GetExec() string {
if m != nil {
return m.Exec
}
return ""
}
func (m *GuessGame) GetMaxBetsOneTime() int64 { func (m *GuessGame) GetMaxBetsOneTime() int64 {
if m != nil { if m != nil {
return m.MaxBetsOneTime return m.MaxBetsOneTime
...@@ -209,13 +192,6 @@ func (m *GuessGame) GetPlatFeeAddr() string { ...@@ -209,13 +192,6 @@ func (m *GuessGame) GetPlatFeeAddr() string {
return "" return ""
} }
func (m *GuessGame) GetExpire() string {
if m != nil {
return m.Expire
}
return ""
}
func (m *GuessGame) GetExpireHeight() int64 { func (m *GuessGame) GetExpireHeight() int64 {
if m != nil { if m != nil {
return m.ExpireHeight return m.ExpireHeight
...@@ -807,19 +783,15 @@ type GuessGameStart struct { ...@@ -807,19 +783,15 @@ type GuessGameStart struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Options string `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` Options string `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"` Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
MaxBetTime string `protobuf:"bytes,4,opt,name=maxBetTime,proto3" json:"maxBetTime,omitempty"` MaxBetHeight int64 `protobuf:"varint,4,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"`
MaxBetHeight int64 `protobuf:"varint,5,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"` MaxBetsOneTime int64 `protobuf:"varint,5,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"`
Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` MaxBetsNumber int64 `protobuf:"varint,6,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"`
Exec string `protobuf:"bytes,7,opt,name=exec,proto3" json:"exec,omitempty"` DevFeeFactor int64 `protobuf:"varint,7,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"`
MaxBetsOneTime int64 `protobuf:"varint,9,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"` DevFeeAddr string `protobuf:"bytes,8,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"`
MaxBetsNumber int64 `protobuf:"varint,10,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"` PlatFeeFactor int64 `protobuf:"varint,9,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"`
DevFeeFactor int64 `protobuf:"varint,11,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"` PlatFeeAddr string `protobuf:"bytes,10,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
DevFeeAddr string `protobuf:"bytes,12,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"` ExpireHeight int64 `protobuf:"varint,11,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
PlatFeeFactor int64 `protobuf:"varint,13,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"` DrivenByAdmin bool `protobuf:"varint,12,opt,name=drivenByAdmin,proto3" json:"drivenByAdmin,omitempty"`
PlatFeeAddr string `protobuf:"bytes,14,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
Expire string `protobuf:"bytes,15,opt,name=expire,proto3" json:"expire,omitempty"`
ExpireHeight int64 `protobuf:"varint,16,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
DrivenByAdmin bool `protobuf:"varint,17,opt,name=drivenByAdmin,proto3" json:"drivenByAdmin,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:"-"`
...@@ -871,13 +843,6 @@ func (m *GuessGameStart) GetCategory() string { ...@@ -871,13 +843,6 @@ func (m *GuessGameStart) GetCategory() string {
return "" return ""
} }
func (m *GuessGameStart) GetMaxBetTime() string {
if m != nil {
return m.MaxBetTime
}
return ""
}
func (m *GuessGameStart) GetMaxBetHeight() int64 { func (m *GuessGameStart) GetMaxBetHeight() int64 {
if m != nil { if m != nil {
return m.MaxBetHeight return m.MaxBetHeight
...@@ -885,20 +850,6 @@ func (m *GuessGameStart) GetMaxBetHeight() int64 { ...@@ -885,20 +850,6 @@ func (m *GuessGameStart) GetMaxBetHeight() int64 {
return 0 return 0
} }
func (m *GuessGameStart) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
func (m *GuessGameStart) GetExec() string {
if m != nil {
return m.Exec
}
return ""
}
func (m *GuessGameStart) GetMaxBetsOneTime() int64 { func (m *GuessGameStart) GetMaxBetsOneTime() int64 {
if m != nil { if m != nil {
return m.MaxBetsOneTime return m.MaxBetsOneTime
...@@ -941,13 +892,6 @@ func (m *GuessGameStart) GetPlatFeeAddr() string { ...@@ -941,13 +892,6 @@ func (m *GuessGameStart) GetPlatFeeAddr() string {
return "" return ""
} }
func (m *GuessGameStart) GetExpire() string {
if m != nil {
return m.Expire
}
return ""
}
func (m *GuessGameStart) GetExpireHeight() int64 { func (m *GuessGameStart) GetExpireHeight() int64 {
if m != nil { if m != nil {
return m.ExpireHeight return m.ExpireHeight
...@@ -1496,20 +1440,17 @@ func (m *ReceiptGuessGame) GetStatusChange() bool { ...@@ -1496,20 +1440,17 @@ func (m *ReceiptGuessGame) GetStatusChange() bool {
type GuessStartTxReq struct { type GuessStartTxReq struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
Options string `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` Options string `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
StartTime int64 `protobuf:"varint,3,opt,name=startTime,proto3" json:"startTime,omitempty"` Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
MaxBetTime string `protobuf:"bytes,4,opt,name=maxBetTime,proto3" json:"maxBetTime,omitempty"` MaxHeight int64 `protobuf:"varint,4,opt,name=maxHeight,proto3" json:"maxHeight,omitempty"`
MaxBetHeight int64 `protobuf:"varint,5,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"` MaxBetHeight int64 `protobuf:"varint,5,opt,name=maxBetHeight,proto3" json:"maxBetHeight,omitempty"`
Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` MaxBetsOneTime int64 `protobuf:"varint,6,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"`
Exec string `protobuf:"bytes,7,opt,name=exec,proto3" json:"exec,omitempty"` MaxBetsNumber int64 `protobuf:"varint,7,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"`
MaxBetsOneTime int64 `protobuf:"varint,8,opt,name=maxBetsOneTime,proto3" json:"maxBetsOneTime,omitempty"` DevFeeFactor int64 `protobuf:"varint,8,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"`
MaxBetsNumber int64 `protobuf:"varint,9,opt,name=maxBetsNumber,proto3" json:"maxBetsNumber,omitempty"` DevFeeAddr string `protobuf:"bytes,9,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"`
DevFeeFactor int64 `protobuf:"varint,10,opt,name=devFeeFactor,proto3" json:"devFeeFactor,omitempty"` PlatFeeFactor int64 `protobuf:"varint,10,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"`
DevFeeAddr string `protobuf:"bytes,11,opt,name=devFeeAddr,proto3" json:"devFeeAddr,omitempty"` PlatFeeAddr string `protobuf:"bytes,11,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"`
PlatFeeFactor int64 `protobuf:"varint,12,opt,name=platFeeFactor,proto3" json:"platFeeFactor,omitempty"` ExpireHeight int64 `protobuf:"varint,12,opt,name=expireHeight,proto3" json:"expireHeight,omitempty"`
PlatFeeAddr string `protobuf:"bytes,13,opt,name=platFeeAddr,proto3" json:"platFeeAddr,omitempty"` Fee int64 `protobuf:"varint,13,opt,name=fee,proto3" json:"fee,omitempty"`
FeeAddr string `protobuf:"bytes,14,opt,name=feeAddr,proto3" json:"feeAddr,omitempty"`
Expire string `protobuf:"bytes,15,opt,name=expire,proto3" json:"expire,omitempty"`
ExpireHeight int64 `protobuf:"varint,16,opt,name=expireHeight,proto3" json:"expireHeight,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:"-"`
...@@ -1554,18 +1495,18 @@ func (m *GuessStartTxReq) GetOptions() string { ...@@ -1554,18 +1495,18 @@ func (m *GuessStartTxReq) GetOptions() string {
return "" return ""
} }
func (m *GuessStartTxReq) GetStartTime() int64 { func (m *GuessStartTxReq) GetCategory() string {
if m != nil { if m != nil {
return m.StartTime return m.Category
} }
return 0 return ""
} }
func (m *GuessStartTxReq) GetMaxBetTime() string { func (m *GuessStartTxReq) GetMaxHeight() int64 {
if m != nil { if m != nil {
return m.MaxBetTime return m.MaxHeight
} }
return "" return 0
} }
func (m *GuessStartTxReq) GetMaxBetHeight() int64 { func (m *GuessStartTxReq) GetMaxBetHeight() int64 {
...@@ -1575,20 +1516,6 @@ func (m *GuessStartTxReq) GetMaxBetHeight() int64 { ...@@ -1575,20 +1516,6 @@ func (m *GuessStartTxReq) GetMaxBetHeight() int64 {
return 0 return 0
} }
func (m *GuessStartTxReq) GetSymbol() string {
if m != nil {
return m.Symbol
}
return ""
}
func (m *GuessStartTxReq) GetExec() string {
if m != nil {
return m.Exec
}
return ""
}
func (m *GuessStartTxReq) GetMaxBetsOneTime() int64 { func (m *GuessStartTxReq) GetMaxBetsOneTime() int64 {
if m != nil { if m != nil {
return m.MaxBetsOneTime return m.MaxBetsOneTime
...@@ -1631,23 +1558,16 @@ func (m *GuessStartTxReq) GetPlatFeeAddr() string { ...@@ -1631,23 +1558,16 @@ func (m *GuessStartTxReq) GetPlatFeeAddr() string {
return "" return ""
} }
func (m *GuessStartTxReq) GetFeeAddr() string { func (m *GuessStartTxReq) GetExpireHeight() int64 {
if m != nil {
return m.FeeAddr
}
return ""
}
func (m *GuessStartTxReq) GetExpire() string {
if m != nil { if m != nil {
return m.Expire return m.ExpireHeight
} }
return "" return 0
} }
func (m *GuessStartTxReq) GetExpireHeight() int64 { func (m *GuessStartTxReq) GetFee() int64 {
if m != nil { if m != nil {
return m.ExpireHeight return m.Fee
} }
return 0 return 0
} }
...@@ -1656,6 +1576,7 @@ type GuessBetTxReq struct { ...@@ -1656,6 +1576,7 @@ type GuessBetTxReq struct {
GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"` GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
Option string `protobuf:"bytes,2,opt,name=option,proto3" json:"option,omitempty"` Option string `protobuf:"bytes,2,opt,name=option,proto3" json:"option,omitempty"`
Bets int64 `protobuf:"varint,3,opt,name=bets,proto3" json:"bets,omitempty"` Bets int64 `protobuf:"varint,3,opt,name=bets,proto3" json:"bets,omitempty"`
Fee int64 `protobuf:"varint,4,opt,name=fee,proto3" json:"fee,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:"-"`
...@@ -1707,8 +1628,16 @@ func (m *GuessBetTxReq) GetBets() int64 { ...@@ -1707,8 +1628,16 @@ func (m *GuessBetTxReq) GetBets() int64 {
return 0 return 0
} }
func (m *GuessBetTxReq) GetFee() int64 {
if m != nil {
return m.Fee
}
return 0
}
type GuessAbortTxReq struct { type GuessAbortTxReq struct {
GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"` GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
Fee int64 `protobuf:"varint,2,opt,name=fee,proto3" json:"fee,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:"-"`
...@@ -1746,9 +1675,17 @@ func (m *GuessAbortTxReq) GetGameId() string { ...@@ -1746,9 +1675,17 @@ func (m *GuessAbortTxReq) GetGameId() string {
return "" return ""
} }
func (m *GuessAbortTxReq) GetFee() int64 {
if m != nil {
return m.Fee
}
return 0
}
type GuessPublishTxReq struct { type GuessPublishTxReq struct {
GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"` GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,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:"-"`
...@@ -1793,6 +1730,13 @@ func (m *GuessPublishTxReq) GetResult() string { ...@@ -1793,6 +1730,13 @@ func (m *GuessPublishTxReq) GetResult() string {
return "" return ""
} }
func (m *GuessPublishTxReq) GetFee() int64 {
if m != nil {
return m.Fee
}
return 0
}
// 索引value值 // 索引value值
type GuessGameRecord struct { type GuessGameRecord struct {
GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"` GameId string `protobuf:"bytes,1,opt,name=gameId,proto3" json:"gameId,omitempty"`
...@@ -1965,88 +1909,86 @@ func init() { ...@@ -1965,88 +1909,86 @@ func init() {
func init() { proto.RegisterFile("guess.proto", fileDescriptor_7574406c5d3430e8) } func init() { proto.RegisterFile("guess.proto", fileDescriptor_7574406c5d3430e8) }
var fileDescriptor_7574406c5d3430e8 = []byte{ var fileDescriptor_7574406c5d3430e8 = []byte{
// 1284 bytes of a gzipped FileDescriptorProto // 1255 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6e, 0xdb, 0x46, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcd, 0x6e, 0xdb, 0xc6,
0x10, 0xb6, 0x48, 0x51, 0x3f, 0x23, 0xd9, 0x96, 0xd7, 0x8e, 0xc3, 0xba, 0x6e, 0xa1, 0x12, 0x41, 0x13, 0xb7, 0x48, 0x51, 0x1f, 0x23, 0xd9, 0x96, 0xd7, 0x8e, 0xc3, 0xbf, 0x61, 0xfc, 0xa1, 0x12,
0xaa, 0x16, 0x88, 0x5b, 0x28, 0x40, 0x51, 0x04, 0xe8, 0xc1, 0x4a, 0x90, 0xd8, 0x97, 0x36, 0xa5, 0x41, 0x2a, 0x14, 0x88, 0x5b, 0x28, 0x40, 0x51, 0xa4, 0xe8, 0xc1, 0x6a, 0x90, 0xd8, 0x97, 0x36,
0x53, 0xa4, 0x57, 0x4a, 0x5a, 0xcb, 0x04, 0x24, 0x92, 0x21, 0x57, 0x86, 0x74, 0xef, 0xa1, 0x97, 0xa5, 0x1d, 0xa4, 0x57, 0x4a, 0x5a, 0xcb, 0x04, 0x24, 0x92, 0x21, 0x57, 0x86, 0x74, 0xef, 0xb5,
0xbe, 0x47, 0x9f, 0xa5, 0x2f, 0xd2, 0x7b, 0x5f, 0xa0, 0xc5, 0xec, 0x2c, 0xa5, 0x25, 0x45, 0xfd, 0x6f, 0xd1, 0x43, 0x6f, 0xed, 0x73, 0xf4, 0x45, 0xfa, 0x1a, 0xc5, 0xcc, 0x2e, 0xc5, 0x25, 0x45,
0xb8, 0x3d, 0xf4, 0xa6, 0xf9, 0xd9, 0x9d, 0xd9, 0x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9, 0x5d, 0xea, 0x98, 0xee, 0x52, 0xc1, 0xda, 0xd0, 0x20, 0x61, 0x76, 0xe5, 0x25, 0xe3, 0x76, 0xb5, 0x5b, 0xe9, 0x99, 0x6e, 0xc6, 0x60, 0x5d, 0x68, 0x11, 0x71, 0xc5, 0xfd, 0xc9,
0x77, 0xb6, 0x25, 0x03, 0xea, 0x2a, 0x76, 0x02, 0x96, 0x08, 0x23, 0x7f, 0x60, 0x57, 0xa4, 0x8d, 0xbd, 0xb0, 0x2d, 0x92, 0xeb, 0xac, 0x95, 0xc6, 0xed, 0xe2, 0xca, 0x4b, 0xee, 0xed, 0x1a, 0x85,
0x04, 0x76, 0x06, 0xb5, 0x81, 0x27, 0xf8, 0x28, 0x8c, 0xe7, 0x76, 0x55, 0x1a, 0x16, 0x32, 0xb3, 0xa4, 0xb3, 0xd8, 0x09, 0x58, 0x22, 0x8c, 0xfc, 0x91, 0x5d, 0x27, 0x99, 0x24, 0xd8, 0x19, 0x34,
0xa1, 0x1a, 0x46, 0x78, 0xba, 0xc4, 0xae, 0x49, 0x53, 0x2a, 0xb2, 0x4f, 0x01, 0x26, 0xde, 0xac, 0x46, 0x9e, 0xe0, 0x93, 0x30, 0x5e, 0xda, 0x0d, 0x12, 0xac, 0x68, 0x66, 0x43, 0x3d, 0x8c, 0xf0,
0xc7, 0x29, 0x99, 0xba, 0x34, 0x6a, 0x1a, 0xe6, 0x40, 0x93, 0xa4, 0x2b, 0xee, 0x8f, 0xee, 0x84, 0xfe, 0x89, 0xdd, 0x24, 0x51, 0x4a, 0x32, 0x07, 0xda, 0x33, 0x6f, 0x31, 0xe0, 0x69, 0x40, 0x40,
0x0d, 0x32, 0xdd, 0x8c, 0x4e, 0x56, 0x61, 0x3e, 0xe9, 0x87, 0x63, 0xbb, 0x41, 0xd5, 0x21, 0x89, 0x01, 0xe5, 0x78, 0xec, 0x39, 0x1c, 0x48, 0x3a, 0xf9, 0x31, 0xe0, 0x74, 0xad, 0x16, 0x69, 0x15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0x31, 0xfd, 0x54, 0x50, 0x75, 0xcb, 0x9a, 0x7d, 0x0d, 0x90, 0xb5, 0x26, 0x2b, 0x5f, 0x03, 0xcf, 0xd2, 0xdd, 0xff, 0x7d, 0x90,
0xba, 0x02, 0x55, 0xd2, 0xec, 0xa6, 0x6e, 0xdd, 0x3f, 0x4b, 0x60, 0xc9, 0x7f, 0x06, 0xd8, 0x37, 0xf8, 0x93, 0xe0, 0x76, 0xe1, 0xec, 0xb1, 0xbe, 0xb6, 0xf7, 0x97, 0xed, 0x83, 0x65, 0x67, 0x52,
0x00, 0xcb, 0xa6, 0x65, 0xc5, 0x43, 0xe8, 0x59, 0xfa, 0xe5, 0xf1, 0x53, 0x90, 0xf8, 0xa3, 0xe0, 0x5f, 0x72, 0x12, 0x96, 0x6f, 0x79, 0x65, 0xe7, 0x5e, 0xa9, 0x59, 0x9e, 0xce, 0xc5, 0x4d, 0xeb,
0xdd, 0xcc, 0xd9, 0x63, 0x5d, 0xed, 0xab, 0xa3, 0x68, 0x1a, 0x2d, 0x5a, 0x93, 0xc6, 0x22, 0x8e, 0x5e, 0xc9, 0xd9, 0x61, 0x8d, 0xfe, 0x20, 0x78, 0xf9, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xea,
0x2c, 0x9e, 0x31, 0x8b, 0xd6, 0xbd, 0x50, 0x2c, 0x9f, 0x32, 0xe6, 0xba, 0x61, 0xb3, 0x60, 0x6d, 0x5a, 0x62, 0xc5, 0x49, 0x10, 0x00, 0x00,
0xbf, 0x22, 0xff, 0xe0, 0x78, 0xfe, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x27, 0xb4, 0x3c, 0x3d,
0x09, 0x11, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
......
...@@ -8,17 +8,13 @@ type GuessGameStartTx struct { ...@@ -8,17 +8,13 @@ type GuessGameStartTx struct {
Topic string `json:"topic,omitempty"` Topic string `json:"topic,omitempty"`
Options string `json:"options,omitempty"` Options string `json:"options,omitempty"`
Category string `json:"category,omitempty"` Category string `json:"category,omitempty"`
MaxBetTime string `json:"maxTime,omitempty"`
MaxBetHeight int64 `json:"maxHeight,omitempty"` MaxBetHeight int64 `json:"maxHeight,omitempty"`
Symbol string `json:"symbol,omitempty"`
Exec string `json:"exec,omitempty"`
MaxBets int64 `json:"maxBets,omitempty"` MaxBets int64 `json:"maxBets,omitempty"`
MaxBetsNumber int64 `json:"maxBetsNumber,omitempty"` MaxBetsNumber int64 `json:"maxBetsNumber,omitempty"`
DevFeeFactor int64 `json:"devFeeFactor,omitempty"` DevFeeFactor int64 `json:"devFeeFactor,omitempty"`
DevFeeAddr string `json:"devFeeAddr,omitempty"` DevFeeAddr string `json:"devFeeAddr,omitempty"`
PlatFeeFactor int64 `json:"platFeeFactor,omitempty"` PlatFeeFactor int64 `json:"platFeeFactor,omitempty"`
PlatFeeAddr string `json:"platFeeAddr,omitempty"` PlatFeeAddr string `json:"platFeeAddr,omitempty"`
Expire string `json:"expire,omitempty"`
ExpireHeight int64 `json:"expireHeight,omitempty"` ExpireHeight int64 `json:"expireHeight,omitempty"`
Fee int64 `json:"fee,omitempty"` Fee int64 `json:"fee,omitempty"`
} }
......
...@@ -121,17 +121,13 @@ func CreateRawGuessStartTx(parm *GuessGameStartTx) (*types.Transaction, error) { ...@@ -121,17 +121,13 @@ func CreateRawGuessStartTx(parm *GuessGameStartTx) (*types.Transaction, error) {
Topic: parm.Topic, Topic: parm.Topic,
Options: parm.Options, Options: parm.Options,
Category: parm.Category, Category: parm.Category,
MaxBetTime: parm.MaxBetTime,
MaxBetHeight: parm.MaxBetHeight, MaxBetHeight: parm.MaxBetHeight,
Symbol: parm.Symbol,
Exec: parm.Exec,
MaxBetsOneTime: parm.MaxBets, MaxBetsOneTime: parm.MaxBets,
MaxBetsNumber: parm.MaxBetsNumber, MaxBetsNumber: parm.MaxBetsNumber,
DevFeeFactor: parm.DevFeeFactor, DevFeeFactor: parm.DevFeeFactor,
DevFeeAddr: parm.DevFeeAddr, DevFeeAddr: parm.DevFeeAddr,
PlatFeeFactor: parm.PlatFeeFactor, PlatFeeFactor: parm.PlatFeeFactor,
PlatFeeAddr: parm.PlatFeeAddr, PlatFeeAddr: parm.PlatFeeAddr,
Expire: parm.Expire,
ExpireHeight: parm.ExpireHeight, ExpireHeight: parm.ExpireHeight,
} }
......
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