Raise the 90-character limit on Bech32 encodings
Regtest addresses are 91 characters, and ZIP 32's Bech32 encoding will be significantly longer.
This commit is contained in:
@@ -169,7 +169,7 @@ std::pair<std::string, data> Decode(const std::string& str) {
|
||||
}
|
||||
if (lower && upper) return {};
|
||||
size_t pos = str.rfind('1');
|
||||
if (str.size() > 90 || pos == str.npos || pos == 0 || pos + 7 > str.size()) {
|
||||
if (str.size() > 1023 || pos == str.npos || pos == 0 || pos + 7 > str.size()) {
|
||||
return {};
|
||||
}
|
||||
data values(str.size() - 1 - pos);
|
||||
|
||||
Reference in New Issue
Block a user