unwire host from storage.Miner.
This commit is contained in:
parent
3aa6d03cc1
commit
1869de7662
@ -99,7 +99,7 @@ func ConfigStorageMiner(c interface{}) Option {
|
||||
|
||||
// Mining / proving
|
||||
Override(new(*slashfilter.SlashFilter), modules.NewSlashFilter),
|
||||
Override(new(*storage.Miner), modules.StorageMiner(config.DefaultStorageMiner().Fees)),
|
||||
// Override(new(*storage.Miner), modules.StorageMiner(config.DefaultStorageMiner().Fees)),
|
||||
Override(new(*miner.Miner), modules.SetupBlockProducer),
|
||||
Override(new(gen.WinningPoStProver), storage.NewWinningPoStProver),
|
||||
Override(new(*storage.Miner), modules.StorageMiner(cfg.Fees)),
|
||||
|
@ -61,7 +61,7 @@ type StorageMinerAPI struct {
|
||||
Host dtypes.Libp2pHost `optional:"true"`
|
||||
|
||||
// Miner / storage
|
||||
Miner *storage.Miner `optional:"true"`
|
||||
Miner *storage.Miner
|
||||
BlockMiner *miner.Miner `optional:"true"`
|
||||
StorageMgr *sectorstorage.Manager `optional:"true"`
|
||||
IStorageMgr sectorstorage.SectorManager `optional:"true"`
|
||||
|
@ -45,7 +45,7 @@ import (
|
||||
smnet "github.com/filecoin-project/go-fil-markets/storagemarket/network"
|
||||
"github.com/filecoin-project/go-jsonrpc/auth"
|
||||
"github.com/filecoin-project/go-multistore"
|
||||
paramfetch "github.com/filecoin-project/go-paramfetch"
|
||||
"github.com/filecoin-project/go-paramfetch"
|
||||
"github.com/filecoin-project/go-state-types/abi"
|
||||
"github.com/filecoin-project/go-statestore"
|
||||
"github.com/filecoin-project/go-storedcounter"
|
||||
@ -198,7 +198,6 @@ type StorageMinerParams struct {
|
||||
Lifecycle fx.Lifecycle
|
||||
MetricsCtx helpers.MetricsCtx
|
||||
API v1api.FullNode
|
||||
Host host.Host
|
||||
MetadataDS dtypes.MetadataDS
|
||||
Sealer sectorstorage.SectorManager
|
||||
SectorIDCounter sealing.SectorIDCounter
|
||||
@ -219,7 +218,6 @@ func StorageMiner(fc config.MinerFeeConfig) func(params StorageMinerParams) (*st
|
||||
lc = params.Lifecycle
|
||||
api = params.API
|
||||
sealer = params.Sealer
|
||||
h = params.Host
|
||||
sc = params.SectorIDCounter
|
||||
verif = params.Verifier
|
||||
prover = params.Prover
|
||||
@ -240,7 +238,7 @@ func StorageMiner(fc config.MinerFeeConfig) func(params StorageMinerParams) (*st
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sm, err := storage.NewMiner(api, maddr, h, ds, sealer, sc, verif, prover, gsd, fc, j, as)
|
||||
sm, err := storage.NewMiner(api, maddr, ds, sealer, sc, verif, prover, gsd, fc, j, as)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ func MinerHandler(a api.StorageMiner, permissioned bool) (http.Handler, error) {
|
||||
mapi = api.PermissionedStorMinerAPI(mapi)
|
||||
}
|
||||
|
||||
_, _ = a.ActorAddress(context.Background())
|
||||
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
|
||||
rpcServer := jsonrpc.NewServer(readerServerOpt)
|
||||
rpcServer.Register("Filecoin", mapi)
|
||||
|
@ -6,8 +6,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/filecoin-project/go-bitfield"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
|
||||
"github.com/ipfs/go-cid"
|
||||
"github.com/ipfs/go-datastore"
|
||||
logging "github.com/ipfs/go-log/v2"
|
||||
@ -52,7 +50,6 @@ var log = logging.Logger("storageminer")
|
||||
type Miner struct {
|
||||
api fullNodeFilteredAPI
|
||||
feeCfg config.MinerFeeConfig
|
||||
h host.Host
|
||||
sealer sectorstorage.SectorManager
|
||||
ds datastore.Batching
|
||||
sc sealing.SectorIDCounter
|
||||
@ -130,7 +127,6 @@ type fullNodeFilteredAPI interface {
|
||||
// NewMiner creates a new Miner object.
|
||||
func NewMiner(api fullNodeFilteredAPI,
|
||||
maddr address.Address,
|
||||
h host.Host,
|
||||
ds datastore.Batching,
|
||||
sealer sectorstorage.SectorManager,
|
||||
sc sealing.SectorIDCounter,
|
||||
@ -149,7 +145,6 @@ func NewMiner(api fullNodeFilteredAPI,
|
||||
verif: verif,
|
||||
prover: prover,
|
||||
addrSel: as,
|
||||
h: h,
|
||||
|
||||
maddr: maddr,
|
||||
getSealConfig: gsd,
|
||||
|
Loading…
Reference in New Issue
Block a user