From 9a48f56fb02338b7f68ab9fd469abc1abe0011c3 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Tue, 12 Jun 2012 23:50:38 +0000 Subject: [PATCH] Bugfix: Move IsStandard scriptSig size check out of IsPushOnly, since BIP16 verification uses the latter too This caused clients to reject block #177618 since it has a P2SH transaction with over 200 bytes in scriptSig. (Upstream commit: e679ec969c8b22c676ebb10bea1038f6c8f13b33) --- src/main.h | 2 +- src/script.h | 2 -- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/main.h b/src/main.h index 44624f5..930f518 100644 --- a/src/main.h +++ b/src/main.h @@ -507,7 +507,7 @@ public: bool IsStandard() const { BOOST_FOREACH(const CTxIn& txin, vin) - if (!txin.scriptSig.IsPushOnly()) + if (txin.scriptSig.size() > 200 || !txin.scriptSig.IsPushOnly()) return error("nonstandard txin: %s", txin.scriptSig.ToString().c_str()); BOOST_FOREACH(const CTxOut& txout, vout) if (!::IsStandard(txout.scriptPubKey)) diff --git a/src/script.h b/src/script.h index 502bce1..8dddb89 100644 --- a/src/script.h +++ b/src/script.h @@ -623,8 +623,6 @@ public: bool IsPushOnly() const { - if (size() > 200) - return false; const_iterator pc = begin(); while (pc < end()) { -- 1.7.1