Commit 9dfb4a46 authored by Sebastian Stammler's avatar Sebastian Stammler

op-node: Add RandomBool to testutils

parent 3969dc49
......@@ -14,6 +14,13 @@ import (
"github.com/ethereum/go-ethereum/crypto"
)
func RandomBool(rng *rand.Rand) bool {
if b := rng.Intn(2); b == 0 {
return false
}
return true
}
func RandomHash(rng *rand.Rand) (out common.Hash) {
rng.Read(out[:])
return
......
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