From 5d8709c3b7fcc66fbf537ec0b6c1a98d69214e25 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Tue, 4 Nov 2014 12:38:56 -0500 Subject: Add IsPushOnly(const_iterator pc) Allows IsPushOnly() to be applied to just part of the script for OP_RETURN outputs. --- src/script/script.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/script/script.h') diff --git a/src/script/script.h b/src/script/script.h index f0725bbbf..3923a559b 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -589,6 +589,7 @@ public: bool IsPayToScriptHash() const; /** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */ + bool IsPushOnly(const_iterator pc) const; bool IsPushOnly() const; /** -- cgit v1.2.3 From da894ab5da222ad317039eb008ec6443fb9113d9 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Mon, 13 Oct 2014 10:18:05 -0400 Subject: Accept any sequence of PUSHDATAs in OP_RETURN outputs Previously only one PUSHDATA was allowed, needlessly limiting applications such as matching OP_RETURN contents with bloom filters that operate on a per-PUSHDATA level. Now any combination that passes IsPushOnly() is allowed, so long as the total size of the scriptPubKey is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings) Also, this fixes the odd bug where previously the PUSHDATA could be replaced by any single opcode, even sigops consuming opcodes such as CHECKMULTISIG. (20 sigops!) --- src/script/script.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/script/script.h') diff --git a/src/script/script.h b/src/script/script.h index 3923a559b..cdc9a71bb 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -167,7 +167,6 @@ enum opcodetype // template matching params - OP_SMALLDATA = 0xf9, OP_SMALLINTEGER = 0xfa, OP_PUBKEYS = 0xfb, OP_PUBKEYHASH = 0xfd, -- cgit v1.2.3