mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-04 08:22:36 +02:00
refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE const
This commit is contained in:
parent
a6f6333ba2
commit
402ee706d8
@ -815,8 +815,8 @@ std::unique_ptr<DescriptorImpl> ParseScript(Span<const char>& sp, ParseScriptCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ctx == ParseScriptContext::P2SH) {
|
if (ctx == ParseScriptContext::P2SH) {
|
||||||
if (script_size + 3 > 520) {
|
if (script_size + 3 > MAX_SCRIPT_ELEMENT_SIZE) {
|
||||||
error = strprintf("P2SH script is too large, %d bytes is larger than 520 bytes", script_size + 3);
|
error = strprintf("P2SH script is too large, %d bytes is larger than %d bytes", script_size + 3, MAX_SCRIPT_ELEMENT_SIZE);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user