mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-28 05:13:03 +02:00
Correct sanity-checking script_size calculation
This commit is contained in:
parent
80d1598133
commit
648f6950cd
@ -1221,7 +1221,7 @@ inline NodeRef<Key> Parse(Span<const char> in, const Ctx& ctx)
|
||||
// n = 1 here because we read the first WRAPPED_EXPR before reaching THRESH
|
||||
to_parse.emplace_back(ParseContext::THRESH, 1, k);
|
||||
to_parse.emplace_back(ParseContext::WRAPPED_EXPR, -1, -1);
|
||||
script_size += 2 + (k > 16);
|
||||
script_size += 2 + (k > 16) + (k > 0x7f) + (k > 0x7fff) + (k > 0x7fffff);
|
||||
} else if (Const("andor(", in)) {
|
||||
to_parse.emplace_back(ParseContext::ANDOR, -1, -1);
|
||||
to_parse.emplace_back(ParseContext::CLOSE_BRACKET, -1, -1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user