mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
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
This commit is contained in:
committed by
Raul Jordan
parent
2e352cf5ff
commit
ce28feea45
@@ -9,6 +9,7 @@ go_library(
|
||||
"is_empty.go",
|
||||
"json_to_pb_converter.go",
|
||||
"log.go",
|
||||
"random_bytes.go",
|
||||
"tempdir.go",
|
||||
"wait_timeout.go",
|
||||
],
|
||||
|
||||
16
shared/testutil/random_bytes.go
Normal file
16
shared/testutil/random_bytes.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user