aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-06-12 23:50:38 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-06-12 23:50:38 +0000
commit9a48f56fb02338b7f68ab9fd469abc1abe0011c3 (patch)
tree8201d64a629a842d964a79b5fc961645edd536f6 /src/main.h
parentaf413c0a0ff507da69afae6399bf3ff3fbf0774b (diff)
downloadbitcoin-9a48f56fb02338b7f68ab9fd469abc1abe0011c3.tar.xz
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)
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.h b/src/main.h
index 44624f5cf7..930f5187d9 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))