Skip to content

Commit

Permalink
builder: Don't require specific NetAPI impl in StorageMinerAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Jun 29, 2021
1 parent b33b38d commit 94bfe71
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions node/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import (
"github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/node/impl/common"
"github.com/filecoin-project/lotus/node/impl/full"
"github.com/filecoin-project/lotus/node/impl/net"
"github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/modules/helpers"
Expand Down Expand Up @@ -363,6 +364,7 @@ var ChainNode = Options(
var MinerNode = Options(
// API dependencies
Override(new(api.Common), From(new(common.CommonAPI))),
Override(new(api.Net), From(new(net.NetAPI))),
Override(new(sectorstorage.StorageAuth), modules.StorageAuth),

// Actor config
Expand Down
9 changes: 5 additions & 4 deletions node/impl/storminer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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"
Expand All @@ -39,17 +40,17 @@ 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"
sto "github.com/filecoin-project/specs-storage/storage"
)

type StorageMinerAPI struct {
common.CommonAPI
net.NetAPI
fx.In

api.Common
api.Net

SectorBlocks *sectorblocks.SectorBlocks

Expand Down

0 comments on commit 94bfe71

Please sign in to comment.