Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goal: fix for goal node status crash - no longer getting block #5100

Merged
merged 1 commit into from
Feb 2, 2023
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
8 changes: 1 addition & 7 deletions daemon/algod/api/server/v2/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,6 @@ func (v2 *Handlers) GetStatus(ctx echo.Context) error {
return internalError(ctx, err, errFailedRetrievingNodeStatus, v2.Log)
}

ledger := v2.Node.LedgerForAPI()
latestBlkHdr, err := ledger.BlockHdr(ledger.Latest())
if err != nil {
return internalError(ctx, err, errFailedRetrievingLatestBlockHeaderStatus, v2.Log)
}

response := model.NodeStatusResponse{
LastRound: uint64(stat.LastRound),
LastVersion: string(stat.LastVersion),
Expand Down Expand Up @@ -813,7 +807,7 @@ func (v2 *Handlers) GetStatus(ctx echo.Context) error {
votesNo := votes - votesYes
upgradeDelay := uint64(stat.UpgradeDelay)
response.UpgradeVotesRequired = &upgradeThreshold
response.UpgradeNodeVote = &latestBlkHdr.UpgradeApprove
response.UpgradeNodeVote = &stat.UpgradeApprove
response.UpgradeDelay = &upgradeDelay
response.UpgradeVotes = &votes
response.UpgradeYesVotes = &votesYes
Expand Down