Skip to content

Commit b4b89de

Browse files
authored
ticketvote: Fix summary best block bug.
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.
1 parent 5d5442c commit b4b89de

File tree

1 file changed

+2
-1
lines changed
  • politeiad/backendv2/tstorebe/plugins/ticketvote

1 file changed

+2
-1
lines changed

politeiad/backendv2/tstorebe/plugins/ticketvote/cmds.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -2400,7 +2400,8 @@ func (p *ticketVotePlugin) summary(token []byte, bestBlock uint32) (*ticketvote.
24002400
// Some other error
24012401
return nil, fmt.Errorf("summaryCache: %v", err)
24022402
default:
2403-
// Caches summary was found. Return it.
2403+
// Cached summary was found. Update the best block and return it.
2404+
s.BestBlock = bestBlock
24042405
return s, nil
24052406
}
24062407

0 commit comments

Comments
 (0)