Skip to content

Commit be7c199

Browse files
committed
Add CheckString for proposals
1 parent 4df4ca8 commit be7c199

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/budget/budgetproposal.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ bool CBudgetProposal::CheckAddress(const int nCurrentHeight)
146146
return true;
147147
}
148148

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

163160
bool CBudgetProposal::IsWellFormed(const CAmount& nTotalBudget, const int nCurrentHeight)
164161
{
162+
bool isV6Enforced = Params().GetConsensus().NetworkUpgradeActive(nCurrentHeight, Consensus::UPGRADE_V6_0);
163+
if (isV6Enforced && !CheckStrings()) {
164+
return false;
165+
}
165166
return CheckStartEnd() && CheckAmount(nTotalBudget) && CheckAddress(nCurrentHeight);
166167
}
167168

0 commit comments

Comments
 (0)