Skip to content

Commit

Permalink
fix: Update tally update scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgr committed Mar 11, 2024
1 parent f5997f6 commit 2268d2e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/gov/utils_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ func (m *Module) UpdateProposal(height int64, blockTime time.Time, id uint64) er
if err != nil {
return fmt.Errorf("error while updating proposal status: %s", err)
}

err = m.updateProposalTallyResult(proposal.ProposalId, height)
if err != nil {
return fmt.Errorf("error while updating proposal tally result: %s", err)
if proposal.Status == govtypes.StatusVotingPeriod {
err = m.updateProposalTallyResult(proposal.ProposalId, height)
if err != nil {
return fmt.Errorf("error while updating proposal tally result: %s", err)
}
}

err = m.updateAccounts(proposal)
Expand Down

0 comments on commit 2268d2e

Please sign in to comment.