Set default index provider ingest config values
Set default values for index-provider ingest config. Leave a TODO to use provider config APIs once defaults exposed. Run `go mod tidy`
This commit is contained in:
parent
43cde484f4
commit
6b7b9793ab
2
go.sum
2
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=
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user