Skip to content

Commit

Permalink
ticketvote: Fix summary best block bug.
Browse files Browse the repository at this point in the history
This diff fixes a bug that was causing the best block in a vote summary
to not be accurate when the summary was being pulled from the cache.
  • Loading branch information
lukebp authored Apr 20, 2021
1 parent 5d5442c commit b4b89de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion politeiad/backendv2/tstorebe/plugins/ticketvote/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,8 @@ func (p *ticketVotePlugin) summary(token []byte, bestBlock uint32) (*ticketvote.
// Some other error
return nil, fmt.Errorf("summaryCache: %v", err)
default:
// Caches summary was found. Return it.
// Cached summary was found. Update the best block and return it.
s.BestBlock = bestBlock
return s, nil
}

Expand Down

0 comments on commit b4b89de

Please sign in to comment.