mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
fixing more p2p tests
This commit is contained in:
@@ -727,18 +727,26 @@ func TestService_BroadcastDataColumn(t *testing.T) {
|
|||||||
// Create a host.
|
// Create a host.
|
||||||
_, pkey, ipAddr := createHost(t, port)
|
_, pkey, ipAddr := createHost(t, port)
|
||||||
|
|
||||||
|
// Create a shared DB for the service
|
||||||
|
db := testDB.SetupDB(t)
|
||||||
|
|
||||||
|
// Create and close the custody info channel immediately since custodyInfo is already set
|
||||||
|
custodyInfoSet := make(chan struct{})
|
||||||
|
close(custodyInfoSet)
|
||||||
|
|
||||||
service := &Service{
|
service := &Service{
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
host: p1.BHost,
|
host: p1.BHost,
|
||||||
pubsub: p1.PubSub(),
|
pubsub: p1.PubSub(),
|
||||||
joinedTopics: map[string]*pubsub.Topic{},
|
joinedTopics: map[string]*pubsub.Topic{},
|
||||||
cfg: &Config{},
|
cfg: &Config{DB: db},
|
||||||
genesisTime: time.Now(),
|
genesisTime: time.Now(),
|
||||||
genesisValidatorsRoot: bytesutil.PadTo([]byte{'A'}, 32),
|
genesisValidatorsRoot: bytesutil.PadTo([]byte{'A'}, 32),
|
||||||
subnetsLock: make(map[uint64]*sync.RWMutex),
|
subnetsLock: make(map[uint64]*sync.RWMutex),
|
||||||
subnetsLockLock: sync.Mutex{},
|
subnetsLockLock: sync.Mutex{},
|
||||||
peers: peers.NewStatus(ctx, &peers.StatusConfig{ScorerParams: &scorers.Config{}}),
|
peers: peers.NewStatus(ctx, &peers.StatusConfig{ScorerParams: &scorers.Config{}}),
|
||||||
custodyInfo: &custodyInfo{},
|
custodyInfo: &custodyInfo{},
|
||||||
|
custodyInfoSet: custodyInfoSet,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a listener.
|
// Create a listener.
|
||||||
|
|||||||
Reference in New Issue
Block a user