From 2268d2e0fcbcb58a4e9431df976016c5b4a8ea89 Mon Sep 17 00:00:00 2001 From: "Alex M. - Clockwork" Date: Mon, 11 Mar 2024 08:44:56 +0200 Subject: [PATCH] fix: Update tally update scheduling --- modules/gov/utils_proposal.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/gov/utils_proposal.go b/modules/gov/utils_proposal.go index 155d901f7..7f601f05d 100644 --- a/modules/gov/utils_proposal.go +++ b/modules/gov/utils_proposal.go @@ -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)