impl: Move CommonAPI into a separate pkg

This commit is contained in:
Łukasz Magiera 2020-03-19 03:31:53 +01:00
parent 1ed7779701
commit 2fa3f2578f
4 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,4 @@
package impl
package common
import (
"context"

View File

@ -3,18 +3,18 @@ package impl
import (
logging "github.com/ipfs/go-log/v2"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/node/impl/client"
"github.com/filecoin-project/lotus/node/impl/common"
"github.com/filecoin-project/lotus/node/impl/full"
"github.com/filecoin-project/lotus/node/impl/market"
"github.com/filecoin-project/lotus/node/impl/paych"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/node/impl/full"
)
var log = logging.Logger("node")
type FullNodeAPI struct {
CommonAPI
common.CommonAPI
full.ChainAPI
client.API
full.MpoolAPI

View File

@ -3,7 +3,6 @@ package impl
import (
"context"
"encoding/json"
"github.com/filecoin-project/lotus/storage/sealmgr/stores"
"net/http"
"os"
"strconv"
@ -13,22 +12,22 @@ import (
"github.com/filecoin-project/go-address"
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-sectorbuilder"
"github.com/filecoin-project/specs-actors/actors/abi"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/apistruct"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/miner"
"github.com/filecoin-project/lotus/node/impl/common"
"github.com/filecoin-project/lotus/storage"
"github.com/filecoin-project/lotus/storage/sealmgr/advmgr"
"github.com/filecoin-project/lotus/storage/sealmgr/stores"
"github.com/filecoin-project/lotus/storage/sectorblocks"
)
type StorageMinerAPI struct {
CommonAPI
common.CommonAPI
SectorBuilderConfig *sectorbuilder.Config
//SectorBuilder sectorbuilder.Interface

View File

@ -17,7 +17,7 @@ import (
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/node/impl/common"
"github.com/filecoin-project/lotus/storage/sealmgr"
"github.com/filecoin-project/lotus/storage/sealmgr/stores"
)
@ -49,7 +49,7 @@ type Manager struct {
lk sync.Mutex
}
func New(ls stores.LocalStorage, si stores.SectorIndex, cfg *sectorbuilder.Config, urls URLs, ca impl.CommonAPI) (*Manager, error) {
func New(ls stores.LocalStorage, si stores.SectorIndex, cfg *sectorbuilder.Config, urls URLs, ca common.CommonAPI) (*Manager, error) {
lstor, err := stores.NewLocal(ls)
if err != nil {
return nil, err