Skip to content

Commit

Permalink
Merge pull request #362 from ConsenSys/fix/mathrand
Browse files Browse the repository at this point in the history
Fix/mathrand Gosec error
  • Loading branch information
Tabaie authored Sep 8, 2022
2 parents b308ebb + 00c873a commit adaf096
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ gnarkd/circuits/**

# compiled sage -> python code
*.sage.py

# Jetbrains stuff
.idea/
2 changes: 1 addition & 1 deletion examples/rollup/rollup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func createAccount(i int) (Account, eddsa.PrivateKey) {
var rnd fr.Element
var privkey eddsa.PrivateKey

// create account, the i-th account has an balance of 20+i
// create account, the i-th account has a balance of 20+i
acc.index = uint64(i)
acc.nonce = uint64(i)
acc.balance.SetUint64(uint64(i) + 20)
Expand Down
2 changes: 1 addition & 1 deletion test/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func randomFiller(w frontend.Circuit, curve ecc.ID) {
fill(w, func() interface{} {
i := int(mrand.Uint32() % uint32(len(seedCorpus)*2)) //#nosec G404 weak rng is fine here
if i >= len(seedCorpus) {
b1, _ := rand.Int(r, m)
b1, _ := rand.Int(r, m) //#nosec G404 weak rng is fine here
return b1
}
r := new(big.Int).Set(seedCorpus[i])
Expand Down

0 comments on commit adaf096

Please sign in to comment.