diff options
author | Antoine Poinsot <darosior@protonmail.com> | 2021-01-05 13:32:41 +0100 |
---|---|---|
committer | Antoine Poinsot <darosior@protonmail.com> | 2021-04-28 10:00:28 +0200 |
commit | 9fc68faf35c700ae955af194dd7f8c1aee85a05b (patch) | |
tree | cf66e42635bc96a9152feb391a8b9b89bca31644 /src/script/interpreter.cpp | |
parent | ac219dcbcc18a48210d58cdfaf7cf27ca5e7435b (diff) |
script: match multisigs with up to MAX_PUBKEYS_PER_MULTISIG keys
We were previously ruling out 17-20 pubkeys multisig, while they are
only invalid under P2SH context.
This makes multisigs with up to 20 keys be detected as valid by the
solver. This is however *not* a policy change as it would only apply
to bare multisigs, which are already limited to 3 pubkeys.
Note that this does not change the sigOpCount calculation (as it would
break consensus). Therefore 1-16 keys multisigs are counted as 1-16 sigops
and 17-20 keys multisigs are counted as 20 sigops.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
Diffstat (limited to 'src/script/interpreter.cpp')
-rw-r--r-- | src/script/interpreter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index abc0625bb1..7e119bb3c4 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -225,7 +225,7 @@ bool static CheckPubKeyEncoding(const valtype &vchPubKey, unsigned int flags, co return true; } -bool static CheckMinimalPush(const valtype& data, opcodetype opcode) { +bool CheckMinimalPush(const valtype& data, opcodetype opcode) { // Excludes OP_1NEGATE, OP_1-16 since they are by definition minimal assert(0 <= opcode && opcode <= OP_PUSHDATA4); if (data.size() == 0) { |