From 5d868f071be9defc41756dd64a42f352a5b5e534 Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Wed, 6 Dec 2023 09:28:41 -0600 Subject: [PATCH] Merge pull request #11490 from filecoin-project/phi-fix-lp-info-log fix: lotus-provider: show addresses in log --- cmd/lotus-provider/run.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-provider/run.go b/cmd/lotus-provider/run.go index bf19ee537..de97aa766 100644 --- a/cmd/lotus-provider/run.go +++ b/cmd/lotus-provider/run.go @@ -176,7 +176,7 @@ var runCmd = &cli.Command{ } } log.Infow("This lotus_provider instance handles", - "miner_addresses", maddrs, + "miner_addresses", minerAddressesToStrings(maddrs), "tasks", lo.Map(activeTasks, func(t harmonytask.TaskInterface, _ int) string { return t.TypeDetails().Name })) taskEngine, err := harmonytask.New(db, activeTasks, deps.listenAddr) @@ -457,3 +457,11 @@ func (p *ProviderAPI) Shutdown(context.Context) error { close(p.ShutdownChan) return nil } + +func minerAddressesToStrings(maddrs []dtypes.MinerAddress) []string { + strs := make([]string, len(maddrs)) + for i, addr := range maddrs { + strs[i] = address.Address(addr).String() + } + return strs +}