Fix
|
func prettyPrintEntityNodes(ctx context.Context, npa *common.NPASelection, stakingConn staking.Backend, registryConn registry.Backend, beaconConn api.Backend, entity *entity.Entity, height int64) error { |
For additional context see #706 (comment).
Problems
- Status / pretty print should never return eagerly as they are used for debugging.
- Misleading output as error can also happen because of other reasons:
|
fmt.Println(" Node is not active") |
registry.Backend.GetNode return registry.NoSuchError as soon as the node descriptor has expired, however descriptor actually stays, just like registry.Backend.GetNodeStatus still returns until debonding period expires.
Solution
Probably best to use switch for both statuses and print them independently (currently we mix them).
Fix
cli/cmd/network/show.go
Line 46 in 7e8b7e0
For additional context see #706 (comment).
Problems
cli/cmd/network/show.go
Line 98 in 7e8b7e0
registry.Backend.GetNodereturnregistry.NoSuchErroras soon as the node descriptor has expired, however descriptor actually stays, just likeregistry.Backend.GetNodeStatusstill returns until debonding period expires.Solution
Probably best to use switch for both statuses and print them independently (currently we mix them).