Skip to content

Commit

Permalink
Use correct time field when removing pre-DIP3 votes (#2535)
Browse files Browse the repository at this point in the history
nTime is not the timestamp from the vote object. nCreationTime is the
correct field to use.

This fixes continues deletion of votes.
  • Loading branch information
codablock authored Dec 6, 2018
1 parent 225c213 commit 5185dd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/governance-object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ std::vector<uint256> CGovernanceObject::RemoveOldVotes(unsigned int nMinTime)
auto& miRef = itMnPair->second.mapInstances;
auto itVotePair = miRef.begin();
while (itVotePair != miRef.end()) {
if (itVotePair->second.nTime < nMinTime) {
if (itVotePair->second.nCreationTime < nMinTime) {
miRef.erase(itVotePair++);
} else {
++itVotePair;
Expand Down

0 comments on commit 5185dd5

Please sign in to comment.