mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
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:
parent
225c2135e2
commit
5185dd5b73
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user