mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +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& miRef = itMnPair->second.mapInstances;
|
||||||
auto itVotePair = miRef.begin();
|
auto itVotePair = miRef.begin();
|
||||||
while (itVotePair != miRef.end()) {
|
while (itVotePair != miRef.end()) {
|
||||||
if (itVotePair->second.nTime < nMinTime) {
|
if (itVotePair->second.nCreationTime < nMinTime) {
|
||||||
miRef.erase(itVotePair++);
|
miRef.erase(itVotePair++);
|
||||||
} else {
|
} else {
|
||||||
++itVotePair;
|
++itVotePair;
|
||||||
|
Loading…
Reference in New Issue
Block a user