Skip to content

Commit

Permalink
don't delete objects when executing SB
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed Aug 9, 2023
1 parent 5c650a8 commit 4a99d60
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/governance/classes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,6 @@ void CSuperblockManager::ExecuteBestSuperblock(CGovernanceManager& governanceMan
// All checks are done in CSuperblock::IsValid via IsBlockValueValid and IsBlockPayeeValid,
// tip wouldn't be updated if anything was wrong. Mark this trigger as executed.
pSuperblock->SetExecuted();
// Remove all used Governance objects: approved Proposal and executed trigger
auto proposals = pSuperblock->GetProposalHashes();
for (const auto& h : proposals) {
governanceManager.DeleteGovernanceObject(h);
}
auto trigger = pSuperblock->GetGovernanceObject(governanceManager);
governanceManager.DeleteGovernanceObject(trigger->GetHash());
}
}

Expand Down

0 comments on commit 4a99d60

Please sign in to comment.