Skip to content

Commit

Permalink
blockservice/test: passthrough blockservice options
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan authored and hacdias committed Aug 22, 2023
1 parent 6a4bf9e commit 303595b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockservice/test/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import (
)

// Mocks returns |n| connected mock Blockservices
func Mocks(n int) []blockservice.BlockService {
func Mocks(n int, opts ...blockservice.Option) []blockservice.BlockService {
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))
sg := testinstance.NewTestInstanceGenerator(net, nil, nil)

instances := sg.Instances(n)

var servs []blockservice.BlockService
for _, i := range instances {
servs = append(servs, blockservice.New(i.Blockstore(), i.Exchange))
servs = append(servs, blockservice.New(i.Blockstore(), i.Exchange, opts...))
}
return servs
}

0 comments on commit 303595b

Please sign in to comment.