fix tests
This commit is contained in:
parent
81e674ad36
commit
e3aaedbc33
@ -32,6 +32,7 @@ import (
|
|||||||
"github.com/filecoin-project/lotus/node"
|
"github.com/filecoin-project/lotus/node"
|
||||||
"github.com/filecoin-project/lotus/node/impl"
|
"github.com/filecoin-project/lotus/node/impl"
|
||||||
"github.com/filecoin-project/lotus/node/modules"
|
"github.com/filecoin-project/lotus/node/modules"
|
||||||
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
"github.com/filecoin-project/lotus/node/repo"
|
"github.com/filecoin-project/lotus/node/repo"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -46,8 +47,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
power.ConsensusMinerMinPower = big.NewInt(2048)
|
power.ConsensusMinerMinPower = big.NewInt(2048)
|
||||||
verifreg.MinVerifiedDealSize = big.NewInt(256)
|
verifreg.MinVerifiedDealSize = big.NewInt(256)
|
||||||
|
|
||||||
modules.PubsubSubscribeImmediately = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const source = 0
|
const source = 0
|
||||||
@ -233,6 +232,7 @@ func (tu *syncTestUtil) addSourceNode(gen int) {
|
|||||||
node.Repo(sourceRepo),
|
node.Repo(sourceRepo),
|
||||||
node.MockHost(tu.mn),
|
node.MockHost(tu.mn),
|
||||||
node.Test(),
|
node.Test(),
|
||||||
|
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
|
||||||
|
|
||||||
node.Override(new(modules.Genesis), modules.LoadGenesis(genesis)),
|
node.Override(new(modules.Genesis), modules.LoadGenesis(genesis)),
|
||||||
)
|
)
|
||||||
@ -265,6 +265,7 @@ func (tu *syncTestUtil) addClientNode() int {
|
|||||||
node.Repo(repo.NewMemory(nil)),
|
node.Repo(repo.NewMemory(nil)),
|
||||||
node.MockHost(tu.mn),
|
node.MockHost(tu.mn),
|
||||||
node.Test(),
|
node.Test(),
|
||||||
|
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
|
||||||
|
|
||||||
node.Override(new(modules.Genesis), modules.LoadGenesis(tu.genesis)),
|
node.Override(new(modules.Genesis), modules.LoadGenesis(tu.genesis)),
|
||||||
)
|
)
|
||||||
|
@ -29,7 +29,6 @@ import (
|
|||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
"github.com/filecoin-project/lotus/chain/types"
|
"github.com/filecoin-project/lotus/chain/types"
|
||||||
"github.com/filecoin-project/lotus/node/modules"
|
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/api/test"
|
"github.com/filecoin-project/lotus/api/test"
|
||||||
"github.com/filecoin-project/lotus/chain/wallet"
|
"github.com/filecoin-project/lotus/chain/wallet"
|
||||||
@ -45,8 +44,6 @@ func init() {
|
|||||||
abi.RegisteredSealProof_StackedDrg2KiBV1: {},
|
abi.RegisteredSealProof_StackedDrg2KiBV1: {},
|
||||||
}
|
}
|
||||||
verifreg.MinVerifiedDealSize = big.NewInt(256)
|
verifreg.MinVerifiedDealSize = big.NewInt(256)
|
||||||
|
|
||||||
modules.PubsubSubscribeImmediately = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestPaymentChannels does a basic test to exercise the payment channel CLI
|
// TestPaymentChannels does a basic test to exercise the payment channel CLI
|
||||||
|
@ -16,7 +16,6 @@ import (
|
|||||||
logging "github.com/ipfs/go-log/v2"
|
logging "github.com/ipfs/go-log/v2"
|
||||||
|
|
||||||
"github.com/filecoin-project/lotus/api/test"
|
"github.com/filecoin-project/lotus/api/test"
|
||||||
"github.com/filecoin-project/lotus/node/modules"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -27,8 +26,6 @@ func init() {
|
|||||||
abi.RegisteredSealProof_StackedDrg2KiBV1: {},
|
abi.RegisteredSealProof_StackedDrg2KiBV1: {},
|
||||||
}
|
}
|
||||||
verifreg.MinVerifiedDealSize = big.NewInt(256)
|
verifreg.MinVerifiedDealSize = big.NewInt(256)
|
||||||
|
|
||||||
modules.PubsubSubscribeImmediately = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAPI(t *testing.T) {
|
func TestAPI(t *testing.T) {
|
||||||
|
@ -31,6 +31,7 @@ import (
|
|||||||
miner2 "github.com/filecoin-project/lotus/miner"
|
miner2 "github.com/filecoin-project/lotus/miner"
|
||||||
"github.com/filecoin-project/lotus/node"
|
"github.com/filecoin-project/lotus/node"
|
||||||
"github.com/filecoin-project/lotus/node/modules"
|
"github.com/filecoin-project/lotus/node/modules"
|
||||||
|
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||||
testing2 "github.com/filecoin-project/lotus/node/modules/testing"
|
testing2 "github.com/filecoin-project/lotus/node/modules/testing"
|
||||||
"github.com/filecoin-project/lotus/node/repo"
|
"github.com/filecoin-project/lotus/node/repo"
|
||||||
"github.com/filecoin-project/lotus/storage/mockstorage"
|
"github.com/filecoin-project/lotus/storage/mockstorage"
|
||||||
@ -370,6 +371,8 @@ func MockSbBuilder(t *testing.T, nFull int, storage []test.StorageMiner) ([]test
|
|||||||
|
|
||||||
node.Override(new(ffiwrapper.Verifier), mock.MockVerifier),
|
node.Override(new(ffiwrapper.Verifier), mock.MockVerifier),
|
||||||
|
|
||||||
|
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
|
||||||
|
|
||||||
genesis,
|
genesis,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user