Skip to content

Commit

Permalink
Merge pull request #11490 from filecoin-project/phi-fix-lp-info-log
Browse files Browse the repository at this point in the history
fix: lotus-provider: show addresses in log
  • Loading branch information
snadrus authored Dec 6, 2023
2 parents e0a8fe3 + 3d30ded commit 9dd9458
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/lotus-provider/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

0 comments on commit 9dd9458

Please sign in to comment.