green tests

This commit is contained in:
Aarsh Shah
2021-11-17 14:48:28 +04:00
parent caf3cfa7d8
commit f8c675bc5e
3 changed files with 10 additions and 20 deletions
+6 -14
View File
@@ -12,14 +12,11 @@ import (
carindex "github.com/ipld/go-car/v2/index"
"github.com/filecoin-project/go-indexer-core/store/storethehash"
"github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
levelds "github.com/ipfs/go-ds-leveldb"
measure "github.com/ipfs/go-ds-measure"
logging "github.com/ipfs/go-log/v2"
carindex "github.com/ipld/go-car/v2/index"
ldbopts "github.com/syndtr/goleveldb/leveldb/opt"
"golang.org/x/xerrors"
@@ -88,11 +85,11 @@ func NewDAGStore(cfg config.DAGStoreConfig, minerApi MinerAPI) (*dagstore.DAGSto
return nil, nil, xerrors.Errorf("failed to initialise dagstore index repo: %w", err)
}
store, err := storethehash.New(indexDir)
if err != nil {
return nil, nil, xerrors.Errorf("failed to initialise store the index: %w", err)
}
topIndex := index.NewInverted(store)
//store, err := storethehash.New(indexDir)
//if err != nil {
//return nil, nil, xerrors.Errorf("failed to initialise store the index: %w", err)
//}
//topIndex := index.NewInverted(store)
dcfg := dagstore.Config{
TransientsDir: transientsDir,
@@ -101,7 +98,7 @@ func NewDAGStore(cfg config.DAGStoreConfig, minerApi MinerAPI) (*dagstore.DAGSto
MountRegistry: registry,
FailureCh: failureCh,
TraceCh: traceCh,
TopLevelIndex: topIndex,
//TopLevelIndex: topIndex,
// not limiting fetches globally, as the Lotus mount does
// conditional throttling.
MaxConcurrentIndex: cfg.MaxConcurrentIndex,
@@ -282,11 +279,6 @@ func (w *Wrapper) RegisterShard(ctx context.Context, pieceCid cid.Cid, carPath s
return nil
}
func (w *Wrapper) GetIterableIndexForPiece(pieceCid cid.Cid) (carindex.IterableIndex, error) {
key := shard.KeyFromCID(pieceCid)
return w.dagst.GetIterableIndex(key)
}
func (w *Wrapper) MigrateDeals(ctx context.Context, deals []storagemarket.MinerDeal) (bool, error) {
log := log.Named("migrator")