From d0e4150ceaf036f4af367261b8b983a3e0c51e68 Mon Sep 17 00:00:00 2001 From: Ingar Shu Date: Fri, 16 Oct 2020 08:30:55 -0700 Subject: [PATCH] Use separate config for Retrieval Filter --- node/builder.go | 5 ++++- node/config/def.go | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/node/builder.go b/node/builder.go index b6b75ecc6..1dc12e80a 100644 --- a/node/builder.go +++ b/node/builder.go @@ -486,7 +486,10 @@ func ConfigStorageMiner(c interface{}) Option { If(cfg.Dealmaking.Filter != "", Override(new(dtypes.StorageDealFilter), modules.BasicDealFilter(dealfilter.CliStorageDealFilter(cfg.Dealmaking.Filter))), - Override(new(dtypes.RetrievalDealFilter), modules.RetrievalDealFilter(dealfilter.CliRetrievalDealFilter(cfg.Dealmaking.Filter))), + ), + + If(cfg.Dealmaking.RetrievalFilter != "", + Override(new(dtypes.RetrievalDealFilter), modules.RetrievalDealFilter(dealfilter.CliRetrievalDealFilter(cfg.Dealmaking.RetrievalFilter))), ), Override(new(storagemarket.StorageProviderNode), storageadapter.NewProviderNodeAdapter(&cfg.Fees)), diff --git a/node/config/def.go b/node/config/def.go index 7eb7e19f0..a1b57286c 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -45,7 +45,8 @@ type DealmakingConfig struct { PieceCidBlocklist []cid.Cid ExpectedSealDuration Duration - Filter string + Filter string + RetrievalFilter string } type SealingConfig struct {