mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
ce28feea45
* 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
19 lines
348 B
Go
19 lines
348 B
Go
package testing
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogo/protobuf/proto"
|
|
)
|
|
|
|
// MockBroadcaster implements p2p.Broadcaster for testing.
|
|
type MockBroadcaster struct {
|
|
BroadcastCalled bool
|
|
}
|
|
|
|
// Broadcast records a broadcast occurred.
|
|
func (m *MockBroadcaster) Broadcast(context.Context, proto.Message) error {
|
|
m.BroadcastCalled = true
|
|
return nil
|
|
}
|