File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -154,26 +154,17 @@ bool CProposalValidator::ValidatePaymentAddress()
154154 return false ;
155155 }
156156
157- static const std::string base58chars = " 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" ;
158-
159- size_t nLength = strPaymentAddress.size ();
160-
161- if ((nLength < 26 ) || (nLength > 35 )) {
162- strErrorMessages += " incorrect payment_address length;" ;
163- return false ;
164- }
165-
166- if (strPaymentAddress.find_first_not_of (base58chars) != std::string::npos) {
167- strErrorMessages += " payment_address contains invalid characters;" ;
168- return false ;
169- }
170-
171157 CBitcoinAddress address (strPaymentAddress);
172158 if (!address.IsValid ()) {
173159 strErrorMessages += " payment_address is invalid;" ;
174160 return false ;
175161 }
176162
163+ if (address.IsScript ()) {
164+ strErrorMessages += " script addresses are not supported;" ;
165+ return false ;
166+ }
167+
177168 return true ;
178169}
179170
You can’t perform that action at this time.
0 commit comments