From bc75c53660e275ead00645e817ec9d53f3bc26b2 Mon Sep 17 00:00:00 2001 From: vyzo Date: Sun, 12 Mar 2023 16:02:51 +0200 Subject: [PATCH] dummy index for itests --- node/builder.go | 2 ++ node/modules/msgindex.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/node/builder.go b/node/builder.go index 76c93cbc6..75162f5ea 100644 --- a/node/builder.go +++ b/node/builder.go @@ -24,6 +24,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/beacon" + "github.com/filecoin-project/lotus/chain/index" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal/alerting" @@ -390,6 +391,7 @@ func Test() Option { Unset(new(*peermgr.PeerMgr)), Override(new(beacon.Schedule), testing.RandomBeacon), Override(new(*storageadapter.DealPublisher), storageadapter.NewDealPublisher(nil, storageadapter.PublishMsgConfig{})), + Override(new(index.MsgIndex), modules.DummyMsgIndex), ) } diff --git a/node/modules/msgindex.go b/node/modules/msgindex.go index 296ecde49..23072ade1 100644 --- a/node/modules/msgindex.go +++ b/node/modules/msgindex.go @@ -29,3 +29,7 @@ func MsgIndex(lc fx.Lifecycle, cs *store.ChainStore, r repo.LockedRepo) (index.M return msgIndex, nil } + +func DummyMsgIndex() (index.MsgIndex, error) { + return index.DummyMsgIndex, nil +}