Use correct time field when removing pre-DIP3 votes (#2535)

nTime is not the timestamp from the vote object. nCreationTime is the
correct field to use.

This fixes continues deletion of votes.
This commit is contained in:
Alexander Block 2018-12-06 14:44:14 +01:00 committed by GitHub
parent 225c2135e2
commit 5185dd5b73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;