Skip to content

Commit

Permalink
remove redundant type string
Browse files Browse the repository at this point in the history
  • Loading branch information
huichiaotsou committed May 4, 2022
1 parent e4d1c75 commit cd0548a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions database/schema/08-gov.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ CREATE TABLE proposal
);
CREATE INDEX proposal_proposer_address_index ON proposal (proposer_address);

CREATE TABLE proposal_invalid_retry
(
proposal_id INTEGER NOT NULL REFERENCES proposal (id),
retry_count INTEGER NOT NULL
);

CREATE TABLE proposal_deposit
(
proposal_id INTEGER NOT NULL REFERENCES proposal (id),
Expand Down
2 changes: 1 addition & 1 deletion modules/gov/utils_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (m *Module) updateDeletedProposalStatus(id uint64) error {

// handleParamChangeProposal updates params to the corresponding modules if a ParamChangeProposal has passed
func (m *Module) handleParamChangeProposal(height int64, proposal govtypes.Proposal) error {
if proposal.Status.String() != types.ProposalStatusPassed {
if proposal.Status.String() != govtypes.StatusPassed.String() {
// If the status of ParamChangeProposal is not passed, do nothing
return nil
}
Expand Down
1 change: 0 additions & 1 deletion types/gov.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

const (
ProposalStatusInvalid = "PROPOSAL_STATUS_INVALID"
ProposalStatusPassed = "PROPOSAL_STATUS_PASSED"
)

// DepositParams contains the data of the deposit parameters of the x/gov module
Expand Down

0 comments on commit cd0548a

Please sign in to comment.