builder: Don't require specific NetAPI impl in StorageMinerAPI
This commit is contained in:
parent
49e26cce7d
commit
812dc266cf
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -245,7 +245,7 @@ func ConfigCommon(cfg *config.Common, enableLibp2pNode bool) Option {
|
||||
}),
|
||||
ApplyIf(func(s *Settings) bool { return s.Base }), // apply only if Base has already been applied
|
||||
If(!enableLibp2pNode,
|
||||
Override(new(api.Net), From(new(api.NetStub))),
|
||||
Override(new(api.Net), new(api.NetStub)),
|
||||
Override(new(api.Common), From(new(common.CommonAPI))),
|
||||
),
|
||||
If(enableLibp2pNode,
|
||||
|
@ -17,6 +17,7 @@ import (
|
||||
"github.com/ipfs/go-cid"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
"github.com/libp2p/go-libp2p-core/peer"
|
||||
"go.uber.org/fx"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
@ -38,8 +39,6 @@ import (
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/markets/storageadapter"
|
||||
"github.com/filecoin-project/lotus/miner"
|
||||
"github.com/filecoin-project/lotus/node/impl/common"
|
||||
"github.com/filecoin-project/lotus/node/impl/net"
|
||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||
"github.com/filecoin-project/lotus/storage"
|
||||
"github.com/filecoin-project/lotus/storage/sectorblocks"
|
||||
@ -47,8 +46,10 @@ import (
|
||||
)
|
||||
|
||||
type StorageMinerAPI struct {
|
||||
common.CommonAPI
|
||||
net.NetAPI
|
||||
fx.In
|
||||
|
||||
api.Common
|
||||
api.Net
|
||||
|
||||
Full api.FullNode
|
||||
LocalStore *stores.Local
|
||||
|
Loading…
Reference in New Issue
Block a user