Skip to content

Commit

Permalink
Add CheckString for proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
panleone committed Mar 29, 2023
1 parent 4df4ca8 commit be7c199
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/budget/budgetproposal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ bool CBudgetProposal::CheckAddress(const int nCurrentHeight)
return true;
}

/* TODO: Add this to IsWellFormed() for the next hard-fork
* This will networkly reject malformed proposal names and URLs
*/
bool CBudgetProposal::CheckStrings()
{
if (strProposalName != SanitizeString(strProposalName)) {
Expand All @@ -162,6 +159,10 @@ bool CBudgetProposal::CheckStrings()

bool CBudgetProposal::IsWellFormed(const CAmount& nTotalBudget, const int nCurrentHeight)
{
bool isV6Enforced = Params().GetConsensus().NetworkUpgradeActive(nCurrentHeight, Consensus::UPGRADE_V6_0);
if (isV6Enforced && !CheckStrings()) {
return false;
}
return CheckStartEnd() && CheckAmount(nTotalBudget) && CheckAddress(nCurrentHeight);
}

Expand Down

0 comments on commit be7c199

Please sign in to comment.