File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 5
5
6
6
#include " budget/budgetproposal.h"
7
7
#include " chainparams.h"
8
+ #include " logging.h"
8
9
#include " script/standard.h"
9
10
#include " utilstrencodings.h"
10
11
@@ -146,9 +147,6 @@ bool CBudgetProposal::CheckAddress(const int nCurrentHeight)
146
147
return true ;
147
148
}
148
149
149
- /* TODO: Add this to IsWellFormed() for the next hard-fork
150
- * This will networkly reject malformed proposal names and URLs
151
- */
152
150
bool CBudgetProposal::CheckStrings ()
153
151
{
154
152
if (strProposalName != SanitizeString (strProposalName)) {
@@ -157,11 +155,17 @@ bool CBudgetProposal::CheckStrings()
157
155
}
158
156
if (strURL != SanitizeString (strURL)) {
159
157
strInvalid = " Proposal URL contains illegal characters." ;
158
+ return false ;
160
159
}
160
+ return true ;
161
161
}
162
162
163
163
bool CBudgetProposal::IsWellFormed (const CAmount& nTotalBudget, const int nCurrentHeight)
164
164
{
165
+ bool isV6Enforced = Params ().GetConsensus ().NetworkUpgradeActive (nCurrentHeight, Consensus::UPGRADE_V6_0);
166
+ if (isV6Enforced && !CheckStrings ()) {
167
+ return false ;
168
+ }
165
169
return CheckStartEnd () && CheckAmount (nTotalBudget) && CheckAddress (nCurrentHeight);
166
170
}
167
171
You can’t perform that action at this time.
0 commit comments