diff --git a/config/config.go b/config/config.go index 8944d303..ea739f13 100644 --- a/config/config.go +++ b/config/config.go @@ -122,7 +122,7 @@ type Mysql struct { type MinerConfig struct { Addr Address - Account string // todo 在合并run模式后才真正起作用 + Account string *ProviderConfig } diff --git a/config/def_config.go b/config/def_config.go index 2410e750..53bc1126 100644 --- a/config/def_config.go +++ b/config/def_config.go @@ -69,7 +69,7 @@ var DefaultMarketConfig = &MarketConfig{ SimultaneousTransfersForStorage: DefaultSimultaneousTransfers, CommonProvider: defaultProviderConfig(), - Miners: make([]*MinerConfig, 0), + Miners: nil, Journal: Journal{Path: "journal"}, Metrics: *metrics.DefaultMetricsConfig(), } diff --git "a/docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" "b/docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" index 3088b0e5..b302b4ed 100644 --- "a/docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" +++ "b/docs/zh/venus-market\351\205\215\347\275\256\350\247\243\351\207\212.md" @@ -428,6 +428,7 @@ Account = "" # 基础参数,见上文 ``` + :::tip 基础参数在不配置时将会使用 `CommonProvider`, 如下: diff --git "a/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" "b/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" index bb1bf582..2e897a3d 100644 --- "a/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" +++ "b/docs/zh/\345\277\253\351\200\237\345\220\257\347\224\250.md" @@ -228,7 +228,7 @@ PublishMsgPeriod = "10s" ./venus-market piece-storage add-s3 --endpoint= --name="oss" ``` -#### `StorageMiners` 配置 +#### `Miners` 配置 `venus-market` 服务的矿工及每个矿工的参数,配置如下: @@ -263,8 +263,13 @@ PublishMsgPeriod = "10s" [CommonProviderConfig.AddressConfig] DisableWorkerFallback = false ``` + +:::tip + 如果有多个矿工,将上述配置拷贝一份即可。***如果矿工比较多,那配置文件会很长,考虑优化?*** +::: + ## venus-market代理libp2p监听 将 `venus-market` 设置为 `miner` 的 `libp2p` 监听代理就是将特定 `miner` 的市场服务的入口设置为当前运行的 `venus-market` 实例。