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 and rjan90 committed Dec 11, 2023
1 parent 4e5dfe8 commit 5d868f0
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 5d868f0

Please sign in to comment.