Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore triggers from the past when voting #5798

Merged
merged 3 commits into from
Jan 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/governance/governance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,10 @@ void CGovernanceManager::VoteGovernanceTriggers(const std::optional<const CGover
// Vote NO-FUNDING for the rest of the active triggers
const auto activeTriggers = triggerman.GetActiveTriggers();
for (const auto& trigger : activeTriggers) {
if (trigger->GetBlockHeight() <= nCachedBlockHeight) {
// ignore triggers from the past
continue;
}
const uint256 trigger_hash = trigger->GetGovernanceObject(*this)->GetHash();
if (trigger_hash == votedFundingYesTriggerHash) {
// Skip actual trigger
Expand Down
Loading