Commit c0fbafee authored by wjx@disanbo.com's avatar wjx@disanbo.com Committed by 33cn

check height

parent a6553a1a
...@@ -26,6 +26,10 @@ func (ticket *Ticket) GetRandNum(height int64, blockNum int64) (types.Message, e ...@@ -26,6 +26,10 @@ func (ticket *Ticket) GetRandNum(height int64, blockNum int64) (types.Message, e
blockNum = maxBlockNum blockNum = maxBlockNum
} }
if blockNum >= height {
return nil, types.ErrNotFound
}
txActions, err := ticket.getTxActions(height, blockNum) txActions, err := ticket.getTxActions(height, blockNum)
if err != nil { if err != nil {
return nil, err return nil, 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