Duplicate codes
Closed this issue · 1 comments
benbaley commented
System information
PlatON version: platon version
OS & Version: Windows/Linux/OSX
Commit hash : e11fe5c58e455c1cb637025d2fb167a54af4faf6
https://github.com/PlatONnetwork/PlatON-Go/blob/develop/x/gov/gov_db.go#L393
L395 duplicate with L407
func MovePreActiveProposalIDToEnd(blockHash common.Hash, proposalID common.Hash) error {
//only one proposalID in PreActiveProposalIDList, so, just set it empty.
err := del(blockHash, KeyPreActiveProposal())
if err != nil {
return err
}
// add this proposal ID to End list
err = addProposalByKey(blockHash, KeyEndProposals(), proposalID)
if err != nil {
return err
}
// remove the pre-active version
err = delPreActiveVersion(blockHash)
if err != nil {
return err
}
return nil
}
benbaley commented
The former is to delete Proposal, the latter is to delete version, non-issue