diff options
| author | Hennadii Stepanov <[email protected]> | 2019-11-11 11:51:49 +0200 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2019-11-11 11:51:49 +0200 |
| commit | 402ee706d8afab3d8d883cd15a660740fcebeb55 (patch) | |
| tree | 05bd45c24714c86d71effc40807e6d4840471342 /src/script/descriptor.cpp | |
| parent | Merge #17416: Appveyor improvement - text file for vcpkg package list (diff) | |
| download | discoin-402ee706d8afab3d8d883cd15a660740fcebeb55.tar.xz discoin-402ee706d8afab3d8d883cd15a660740fcebeb55.zip | |
refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE const
Diffstat (limited to 'src/script/descriptor.cpp')
| -rw-r--r-- | src/script/descriptor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 13cdd6c61..32b388b7f 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -815,8 +815,8 @@ std::unique_ptr<DescriptorImpl> ParseScript(Span<const char>& sp, ParseScriptCon } } if (ctx == ParseScriptContext::P2SH) { - if (script_size + 3 > 520) { - error = strprintf("P2SH script is too large, %d bytes is larger than 520 bytes", script_size + 3); + if (script_size + 3 > MAX_SCRIPT_ELEMENT_SIZE) { + error = strprintf("P2SH script is too large, %d bytes is larger than %d bytes", script_size + 3, MAX_SCRIPT_ELEMENT_SIZE); return nullptr; } } |