Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持本地solo模式的market #357

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion venus-sector-manager/dep/sealer_constructor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down
2 changes: 2 additions & 0 deletions venus-sector-manager/modules/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ type CommonAPIConfig struct {
Gateway []string
Token string
ChainEventInterval Duration
MarketToken string
}

func defaultCommonAPIConfig(example bool) CommonAPIConfig {
Expand All @@ -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
}
Expand Down