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: e679ec969c)
This commit is contained in:
Luke Dashjr
2012-06-12 23:50:38 +00:00
parent af413c0a0f
commit 9a48f56fb0
2 changed files with 1 additions and 3 deletions

View File

@@ -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))

View File

@@ -623,8 +623,6 @@ public:
bool IsPushOnly() const
{
if (size() > 200)
return false;
const_iterator pc = begin();
while (pc < end())
{