Skip to content

Commit

Permalink
fix(cmd/network): Show ParaTimeID during node startup
Browse files Browse the repository at this point in the history
  • Loading branch information
amela committed Jan 8, 2025
1 parent 6fa3192 commit e6423f9
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions cmd/network/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,24 @@ var statusCmd = &cobra.Command{
sort.Slice(keys, func(i, j int) bool {
var iParatimeName, jParatimeName string

iDescriptor := nodeStatus.Runtimes[keys[i]].Descriptor
jDescriptor := nodeStatus.Runtimes[keys[j]].Descriptor
iKey := keys[i].String()
jKey := keys[j].String()

if iDescriptor != nil {
iDescriptorID := iDescriptor.ID.String()
iParatimeName = getParatimeName(cfg, iDescriptorID) + iDescriptorID
}

if jDescriptor != nil {
jDescriptorID := jDescriptor.ID.String()
jParatimeName = getParatimeName(cfg, jDescriptorID) + jDescriptorID
}
iParatimeName = getParatimeName(cfg, iKey) + iKey
jParatimeName = getParatimeName(cfg, jKey) + jKey

return iParatimeName < jParatimeName
})

for _, key := range keys {
runtime := nodeStatus.Runtimes[key]

paratimeName := getParatimeName(cfg, key.String())
fmt.Printf("%s (%s):", paratimeName, key.String())
fmt.Println()

descriptor := runtime.Descriptor
if descriptor != nil {
paratimeName := getParatimeName(cfg, descriptor.ID.String())
fmt.Printf("%s (%s):", paratimeName, descriptor.ID)
fmt.Println()

fmt.Printf(" Kind: %s", descriptor.Kind)
fmt.Println()

Expand Down

0 comments on commit e6423f9

Please sign in to comment.