minor renames.
This commit is contained in:
parent
416340d227
commit
f08c792686
@ -5,6 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-state-types/abi"
|
"github.com/filecoin-project/go-state-types/abi"
|
||||||
|
"github.com/filecoin-project/lotus/build"
|
||||||
"github.com/filecoin-project/lotus/chain/actors/policy"
|
"github.com/filecoin-project/lotus/chain/actors/policy"
|
||||||
logging "github.com/ipfs/go-log/v2"
|
logging "github.com/ipfs/go-log/v2"
|
||||||
)
|
)
|
||||||
@ -20,4 +21,5 @@ func init() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("failed to set BELLMAN_NO_GPU env variable: %s", err))
|
panic(fmt.Sprintf("failed to set BELLMAN_NO_GPU env variable: %s", err))
|
||||||
}
|
}
|
||||||
|
build.InsecurePoStValidation = true
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ func CreateTestStorageNode(ctx context.Context, t *testing.T, waddr address.Addr
|
|||||||
return TestMiner{StorageMiner: minerapi, MineOne: mineOne, Stop: stop}
|
return TestMiner{StorageMiner: minerapi, MineOne: mineOne, Stop: stop}
|
||||||
}
|
}
|
||||||
|
|
||||||
func storageBuilder(parentNode TestFullNode, mn mocknet.Mocknet, opts node.Option) StorageBuilder {
|
func storageBuilder(parentNode TestFullNode, mn mocknet.Mocknet, opts node.Option) MinerBuilder {
|
||||||
return func(ctx context.Context, t *testing.T, spt abi.RegisteredSealProof, owner address.Address) TestMiner {
|
return func(ctx context.Context, t *testing.T, spt abi.RegisteredSealProof, owner address.Address) TestMiner {
|
||||||
pk, _, err := crypto.GenerateEd25519Key(rand.Reader)
|
pk, _, err := crypto.GenerateEd25519Key(rand.Reader)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
@ -2,11 +2,8 @@ package kit
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
logging "github.com/ipfs/go-log/v2"
|
|
||||||
"github.com/multiformats/go-multiaddr"
|
"github.com/multiformats/go-multiaddr"
|
||||||
|
|
||||||
"github.com/filecoin-project/go-address"
|
"github.com/filecoin-project/go-address"
|
||||||
@ -15,22 +12,12 @@ import (
|
|||||||
|
|
||||||
lapi "github.com/filecoin-project/lotus/api"
|
lapi "github.com/filecoin-project/lotus/api"
|
||||||
"github.com/filecoin-project/lotus/api/v1api"
|
"github.com/filecoin-project/lotus/api/v1api"
|
||||||
"github.com/filecoin-project/lotus/build"
|
|
||||||
"github.com/filecoin-project/lotus/chain/stmgr"
|
"github.com/filecoin-project/lotus/chain/stmgr"
|
||||||
"github.com/filecoin-project/lotus/miner"
|
"github.com/filecoin-project/lotus/miner"
|
||||||
"github.com/filecoin-project/lotus/node"
|
"github.com/filecoin-project/lotus/node"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
type MinerBuilder func(context.Context, *testing.T, abi.RegisteredSealProof, address.Address) TestMiner
|
||||||
logging.SetAllLoggers(logging.LevelInfo)
|
|
||||||
err := os.Setenv("BELLMAN_NO_GPU", "1")
|
|
||||||
if err != nil {
|
|
||||||
panic(fmt.Sprintf("failed to set BELLMAN_NO_GPU env variable: %s", err))
|
|
||||||
}
|
|
||||||
build.InsecurePoStValidation = true
|
|
||||||
}
|
|
||||||
|
|
||||||
type StorageBuilder func(context.Context, *testing.T, abi.RegisteredSealProof, address.Address) TestMiner
|
|
||||||
|
|
||||||
type TestFullNode struct {
|
type TestFullNode struct {
|
||||||
v1api.FullNode
|
v1api.FullNode
|
||||||
@ -38,7 +25,7 @@ type TestFullNode struct {
|
|||||||
// API server is created for this Node
|
// API server is created for this Node
|
||||||
ListenAddr multiaddr.Multiaddr
|
ListenAddr multiaddr.Multiaddr
|
||||||
|
|
||||||
Stb StorageBuilder
|
Stb MinerBuilder
|
||||||
}
|
}
|
||||||
|
|
||||||
type TestMiner struct {
|
type TestMiner struct {
|
Loading…
Reference in New Issue
Block a user