Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
fix: use nil pointer without check nil (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
zl03jsj authored and ta0li committed Feb 25, 2022
1 parent 1aad69e commit f1fb3f8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions app/venus-sealer/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,21 @@ var sectorsStatusCmd = &cli.Command{
fmt.Printf("Last Error:\t\t%s\n", status.LastErr)
}

fmt.Printf("CCUpdate:\t\t\n", status.CCUpdate)
fmt.Printf("CCUpdate:\t%v\n", status.CCUpdate)

if status.CCUpdate {
fmt.Printf("UpdateSealed:\t\t\n", status.UpdateSealed.String())
fmt.Printf("UpdateIUnsealed:\t\t\n", status.UpdateUnsealed.String())
fmt.Printf("ReplicaUpdateMessage:\t\t\n", status.ReplicaUpdateMessage)
var updateSealed, updateUnsealed string

if status.UpdateSealed != nil {
updateSealed = status.UpdateSealed.String()
}
if status.UpdateUnsealed != nil {
updateUnsealed = status.UpdateUnsealed.String()
}

fmt.Printf("UpdateSealed:\t%s\n", updateSealed)
fmt.Printf("UpdateUnsealed:\t%s\n", updateUnsealed)
fmt.Printf("ReplicaUpdateMessage:%s\n", status.ReplicaUpdateMessage)
}

if onChainInfo {
Expand Down

0 comments on commit f1fb3f8

Please sign in to comment.