remove api dependency on sealing fsm package

This commit is contained in:
Jeromy
2020-04-23 15:33:59 -07:00
parent 309f54aa0c
commit f4948dcba0
6 changed files with 21 additions and 17 deletions
+4 -4
View File
@@ -17,6 +17,7 @@ import (
"github.com/filecoin-project/sector-storage/stores"
"github.com/filecoin-project/sector-storage/storiface"
"github.com/filecoin-project/specs-actors/actors/abi"
sealing "github.com/filecoin-project/storage-fsm"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/apistruct"
@@ -25,7 +26,6 @@ import (
"github.com/filecoin-project/lotus/node/impl/common"
"github.com/filecoin-project/lotus/storage"
"github.com/filecoin-project/lotus/storage/sectorblocks"
sealing "github.com/filecoin-project/storage-fsm"
)
type StorageMinerAPI struct {
@@ -106,7 +106,7 @@ func (sm *StorageMinerAPI) SectorsStatus(ctx context.Context, sid abi.SectorNumb
return api.SectorInfo{
SectorID: sid,
State: info.State,
State: api.SectorState(info.State),
CommD: info.CommD,
CommR: info.CommR,
Proof: info.Proof,
@@ -164,8 +164,8 @@ func (sm *StorageMinerAPI) StorageStat(ctx context.Context, id stores.ID) (store
return sm.StorageMgr.FsStat(ctx, id)
}
func (sm *StorageMinerAPI) SectorsUpdate(ctx context.Context, id abi.SectorNumber, state sealing.SectorState) error {
return sm.Miner.ForceSectorState(ctx, id, state)
func (sm *StorageMinerAPI) SectorsUpdate(ctx context.Context, id abi.SectorNumber, state api.SectorState) error {
return sm.Miner.ForceSectorState(ctx, id, sealing.SectorState(state))
}
func (sm *StorageMinerAPI) WorkerConnect(ctx context.Context, url string) error {