diff --git a/venus-sector-manager/dep/sealer_constructor.go b/venus-sector-manager/dep/sealer_constructor.go index 3804c59b0..56f09a652 100644 --- a/venus-sector-manager/dep/sealer_constructor.go +++ b/venus-sector-manager/dep/sealer_constructor.go @@ -465,7 +465,11 @@ type MarketAPIRelatedComponets struct { func BuildMarketAPI(gctx GlobalContext, lc fx.Lifecycle, scfg *modules.SafeConfig, infoAPI core.MinerInfoAPI) (market.API, error) { scfg.Lock() - api, token := scfg.Common.API.Market, scfg.Common.API.Token + marketToken := scfg.Common.API.Token + if scfg.Common.API.MarketToken != "" { + marketToken = scfg.Common.API.MarketToken + } + api, token := scfg.Common.API.Market, marketToken defer scfg.Unlock() if api == "" { diff --git a/venus-sector-manager/modules/config.go b/venus-sector-manager/modules/config.go index 7e0fb0ca5..c9615dc0c 100644 --- a/venus-sector-manager/modules/config.go +++ b/venus-sector-manager/modules/config.go @@ -63,6 +63,7 @@ type CommonAPIConfig struct { Gateway []string Token string ChainEventInterval Duration + MarketToken string } func defaultCommonAPIConfig(example bool) CommonAPIConfig { @@ -75,6 +76,7 @@ func defaultCommonAPIConfig(example bool) CommonAPIConfig { cfg.Market = "/ip4/{api_host}/tcp/{api_port}" cfg.Gateway = []string{"/ip4/{api_host}/tcp/{api_port}"} cfg.Token = "{some token}" + cfg.MarketToken = "{some token}" } return cfg }