-
Notifications
You must be signed in to change notification settings - Fork 662
/
test_config.go
31 lines (27 loc) · 970 Bytes
/
test_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package common
import (
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/snow"
"github.com/ava-labs/avalanchego/snow/validators"
)
// DefaultConfigTest returns a test configuration
func DefaultConfigTest() Config {
isBootstrapped := false
subnet := &SubnetTest{
IsBootstrappedF: func() bool { return isBootstrapped },
BootstrappedF: func(ids.ID) { isBootstrapped = true },
}
return Config{
Ctx: snow.DefaultContextTest(),
Validators: validators.NewSet(),
Beacons: validators.NewSet(),
Sender: &SenderTest{},
Bootstrapable: &BootstrapableTest{},
Subnet: subnet,
Timer: &TimerTest{},
MultiputMaxContainersSent: 2000,
MultiputMaxContainersReceived: 2000,
}
}