Skip to content

Commit

Permalink
Merge pull request #264 from filecoin-project/opt/lt/default_nil_for_…
Browse files Browse the repository at this point in the history
…miners_config

opt: Avoid configuration file generating miners = []
  • Loading branch information
simlecode authored Dec 28, 2022
2 parents 365e9a9 + 1657003 commit 3fff87d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ type Mysql struct {

type MinerConfig struct {
Addr Address
Account string // todo 在合并run模式后才真正起作用
Account string

*ProviderConfig
}
Expand Down
2 changes: 1 addition & 1 deletion config/def_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var DefaultMarketConfig = &MarketConfig{
SimultaneousTransfersForStorage: DefaultSimultaneousTransfers,

CommonProvider: defaultProviderConfig(),
Miners: make([]*MinerConfig, 0),
Miners: nil,
Journal: Journal{Path: "journal"},
Metrics: *metrics.DefaultMetricsConfig(),
}
Expand Down
1 change: 1 addition & 0 deletions docs/zh/venus-market配置解释.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ Account = ""
# 基础参数,见上文
```

:::tip

基础参数在不配置时将会使用 `CommonProvider`, 如下:
Expand Down
7 changes: 6 additions & 1 deletion docs/zh/快速启用.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ PublishMsgPeriod = "10s"
./venus-market piece-storage add-s3 --endpoint=<url> --name="oss"
```

#### `StorageMiners` 配置
#### `Miners` 配置

`venus-market` 服务的矿工及每个矿工的参数,配置如下:

Expand Down Expand Up @@ -263,8 +263,13 @@ PublishMsgPeriod = "10s"
[CommonProviderConfig.AddressConfig]
DisableWorkerFallback = false
```

:::tip

如果有多个矿工,将上述配置拷贝一份即可。***如果矿工比较多,那配置文件会很长,考虑优化?***

:::

## venus-market代理libp2p监听

`venus-market` 设置为 `miner``libp2p` 监听代理就是将特定 `miner` 的市场服务的入口设置为当前运行的 `venus-market` 实例。
Expand Down

0 comments on commit 3fff87d

Please sign in to comment.