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

fix: use nil pointer without check nil #172

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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