Merge pull request #11490 from filecoin-project/phi-fix-lp-info-log
fix: lotus-provider: show addresses in log
This commit is contained in:
commit
9dd94585b6
@ -176,7 +176,7 @@ var runCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Infow("This lotus_provider instance handles",
|
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 }))
|
"tasks", lo.Map(activeTasks, func(t harmonytask.TaskInterface, _ int) string { return t.TypeDetails().Name }))
|
||||||
|
|
||||||
taskEngine, err := harmonytask.New(db, activeTasks, deps.listenAddr)
|
taskEngine, err := harmonytask.New(db, activeTasks, deps.listenAddr)
|
||||||
@ -457,3 +457,11 @@ func (p *ProviderAPI) Shutdown(context.Context) error {
|
|||||||
close(p.ShutdownChan)
|
close(p.ShutdownChan)
|
||||||
return nil
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user