From: Luke Dashjr Date: Tue, 12 Jun 2012 23:50:38 +0000 (+0000) Subject: Bugfix: Move IsStandard scriptSig size check out of IsPushOnly, since BIP16 verificat... X-Git-Tag: v0.4.0-unstable~129^2~1^2^2^2^2~2 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=9a48f56fb02338b7f68ab9fd469abc1abe0011c3 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) --- 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()) {