diff --git a/go.sum b/go.sum index a46059f53..17e1e4148 100644 --- a/go.sum +++ b/go.sum @@ -361,8 +361,6 @@ github.com/filecoin-project/go-jsonrpc v0.1.5/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4G github.com/filecoin-project/go-legs v0.0.0-20211013165050-9ab325b6d2eb/go.mod h1:lKwBnslfNGG7JnsP9uQZl3yK7f74fit1MyHcwuuOP3k= github.com/filecoin-project/go-legs v0.0.0-20211112111427-68d536862db9/go.mod h1:g32LVimhcYPte22LK8XslKqLBem54QxuMQmkrzbAyEI= github.com/filecoin-project/go-legs v0.0.0-20211125094504-5fdf15090c48/go.mod h1:g32LVimhcYPte22LK8XslKqLBem54QxuMQmkrzbAyEI= -github.com/filecoin-project/go-legs v0.0.0-20211202193658-45deff4405e1 h1:dq7K8iCh8gnttxr35BHJcI6o/8I5z1sArlqL9LJjti0= -github.com/filecoin-project/go-legs v0.0.0-20211202193658-45deff4405e1/go.mod h1:8rq/QxX6wlL0AehqVi5CqxXT3xYz1LIpp1HCZ6qI2EY= github.com/filecoin-project/go-legs v0.0.0-20211209161055-918cd188bf1d h1:DXm6XG2YibCTcm1vmNz9FWZ2nwz8tgoycrhclZRgKzA= github.com/filecoin-project/go-legs v0.0.0-20211209161055-918cd188bf1d/go.mod h1:HFp0jUZopkX9DW6FOmhHltVfEatfAcm3ZD6Z/kY4iNg= github.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ= diff --git a/node/config/def.go b/node/config/def.go index 6c518d209..1bf58572d 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -10,6 +10,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/big" + ipconfig "github.com/filecoin-project/index-provider/config" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/actors/builtin" @@ -224,6 +225,15 @@ func DefaultStorageMiner() *StorageMiner { GCInterval: Duration(1 * time.Minute), }, } + + // TODO: Remove hardcoded defaults once provider library exposes them. + // See: https://github.com/filecoin-project/index-provider/issues/108 + cfg.IndexerProvider.Ingest = ipconfig.Ingest{ + LinkCacheSize: 1024, + LinkedChunkSize: 100, + PubSubTopic: "indexer/ingest", + } + cfg.Common.API.ListenAddress = "/ip4/127.0.0.1/tcp/2345/http" cfg.Common.API.RemoteListenAddress = "127.0.0.1:2345" return cfg diff --git a/node/config/def_test.go b/node/config/def_test.go index d45bc6ec8..85264358b 100644 --- a/node/config/def_test.go +++ b/node/config/def_test.go @@ -52,3 +52,8 @@ func TestDefaultMinerRoundtrip(t *testing.T) { require.True(t, reflect.DeepEqual(c, c2)) } + +func TestDefaultStorageMiner_SetsIndexIngestTopic(t *testing.T) { + subject := DefaultStorageMiner() + require.Equal(t, "indexer/ingest", subject.IndexerProvider.PubSubTopic) +}