mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
use rand.Int63n, remove underflow check, remove unnecessary cast
This commit is contained in:
@@ -88,8 +88,8 @@ func Tx(hash []byte, prove bool) (*ctypes.ResultTx, error) {
|
||||
|
||||
var proof types.TxProof
|
||||
if prove {
|
||||
// TODO: handle overflow
|
||||
block := blockStore.LoadBlock(height)
|
||||
// TODO: handle overflow
|
||||
proof = block.Data.Txs.Proof(index)
|
||||
}
|
||||
|
||||
@@ -187,8 +187,8 @@ func TxSearch(query string, prove bool) ([]*ctypes.ResultTx, error) {
|
||||
index := r.Index
|
||||
|
||||
if prove {
|
||||
// TODO: handle overflow
|
||||
block := blockStore.LoadBlock(height)
|
||||
// TODO: handle overflow
|
||||
proof = block.Data.Txs.Proof(int(index))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user