mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-19 21:56:22 +00:00
Disable lint for weak RNG usage for test app
Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
@@ -390,6 +390,9 @@ func (app *Application) ExtendVote(req abci.RequestExtendVote) abci.ResponseExte
|
||||
return abci.ResponseExtendVote{}
|
||||
}
|
||||
ext := make([]byte, binary.MaxVarintLen64)
|
||||
// We don't care that these values are generated by a weak random number
|
||||
// generator. It's just for test purposes.
|
||||
// nolint:gosec // G404: Use of weak random number generator
|
||||
num := rand.Int63n(voteExtensionMaxVal)
|
||||
extLen := binary.PutVarint(ext, num)
|
||||
app.logger.Info("generated vote extension", "num", num, "ext", fmt.Sprintf("%x", ext[:extLen]), "state.Height", app.state.Height)
|
||||
|
||||
Reference in New Issue
Block a user