prysm-pulse/shared/testutil/random_bytes.go
Preston Van Loon ce28feea45 Regular sync: pubsub subscriber for beacon blocks (#3220)
* add validation

* add block db check in validation

* merge

* in memory caching of seen blocks

* basic block processing

* Update BUILD.bazel

* use new receiveBlockNoPubsub

* fix build

* add TODO issue numbers

* add TODO issue numbers

* lint
2019-08-22 13:11:52 -05:00

17 lines
243 B
Go

package testutil
import (
"crypto/rand"
"testing"
)
// Random32Bytes generates a random 32 byte slice.
func Random32Bytes(t *testing.T) []byte {
b := make([]byte, 32)
_, err := rand.Read(b)
if err != nil {
t.Fatal(err)
}
return b
}