Commit 4914e587 authored by wjx@disanbo.com's avatar wjx@disanbo.com Committed by vipwzw

fix gofmt

parent 5cafee06
...@@ -53,7 +53,7 @@ const ( ...@@ -53,7 +53,7 @@ const (
const ( const (
luckyNumMol = 100000 luckyNumMol = 100000
decimal = 100000000 //1e8 decimal = 100000000 //1e8
randMolNum = 5 //randMolNum = 5
grpcRecSize int = 5 * 30 * 1024 * 1024 grpcRecSize int = 5 * 30 * 1024 * 1024
blockNum = 5 blockNum = 5
) )
...@@ -521,14 +521,14 @@ func (action *Action) findLuckyNum(isSolo bool, lott *LotteryDB) int64 { ...@@ -521,14 +521,14 @@ func (action *Action) findLuckyNum(isSolo bool, lott *LotteryDB) int64 {
var err error var err error
var hash []byte var hash []byte
if isSolo { if isSolo {
//used for internal verfication //used for internal verification
num = 12345 num = 12345
} else { } else {
//发消息给randnum模块 //发消息给randnum模块
//在主链上,当前高度查询不到,如果要保证区块个数,高度传入action.height-1 //在主链上,当前高度查询不到,如果要保证区块个数,高度传入action.height-1
llog.Debug("findLuckyNum on randnum module") llog.Debug("findLuckyNum on randnum module")
if !types.IsPara() { if !types.IsPara() {
req := &types.ReqRandHash{ExecName: "ticket", Height: action.height - 1, BlockNum: 5} req := &types.ReqRandHash{ExecName: "ticket", Height: action.height - 1, BlockNum: blockNum}
msg, err = action.api.Query("ticket", "RandNumHash", req) msg, err = action.api.Query("ticket", "RandNumHash", req)
if err != nil { if err != nil {
return -1 return -1
...@@ -541,7 +541,7 @@ func (action *Action) findLuckyNum(isSolo bool, lott *LotteryDB) int64 { ...@@ -541,7 +541,7 @@ func (action *Action) findLuckyNum(isSolo bool, lott *LotteryDB) int64 {
llog.Error("findLuckyNum", "mainHeight", mainHeight) llog.Error("findLuckyNum", "mainHeight", mainHeight)
return -1 return -1
} }
req := &types.ReqRandHash{ExecName: "ticket", Height: mainHeight, BlockNum: 5} req := &types.ReqRandHash{ExecName: "ticket", Height: mainHeight, BlockNum: blockNum}
reply, err := action.grpcClient.QueryRandNum(context.Background(), req) reply, err := action.grpcClient.QueryRandNum(context.Background(), req)
if err != nil { if err != nil {
return -1 return -1
......
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