set BootstrapPeerThreshold to 1 for tests

This commit is contained in:
vyzo 2020-10-29 19:32:09 +02:00
parent 57234d8ef3
commit 8d25fd39cf
2 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,10 @@ import (
"github.com/filecoin-project/lotus/chain/types/mock"
)
func init() {
BootstrapPeerThreshold = 1
}
var genTs = mock.TipSet(mock.MkBlock(nil, 0, 0))
type syncOp struct {

View File

@ -23,6 +23,7 @@ import (
"github.com/filecoin-project/lotus/api/client"
"github.com/filecoin-project/lotus/api/test"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/policy"
@ -50,6 +51,10 @@ import (
"github.com/stretchr/testify/require"
)
func init() {
chain.BootstrapPeerThreshold = 1
}
func CreateTestStorageNode(ctx context.Context, t *testing.T, waddr address.Address, act address.Address, pk crypto.PrivKey, tnd test.TestNode, mn mocknet.Mocknet, opts node.Option) test.TestStorageNode {
r := repo.NewMemory(nil)