aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2010-12-08 20:06:44 -0500
committerGavin Andresen <gavinandresen@gmail.com>2010-12-08 20:06:44 -0500
commitd12e53ea090ba49a82ff4f79782af809d21cf280 (patch)
tree8fb80d4335255d62eb65e9f7b2def7ca799b55c4 /main.h
parent0a87c91692765abb6d49969b968389133e846768 (diff)
parent82201801336f64ee77851b9eaab9383ee4e442f0 (diff)
Merge remote branch 'refs/remotes/svn/trunk' into svn
Diffstat (limited to 'main.h')
-rw-r--r--main.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.h b/main.h
index b221e62a7e..0b950e8074 100644
--- a/main.h
+++ b/main.h
@@ -499,6 +499,17 @@ public:
return n;
}
+ bool IsStandard() const
+ {
+ foreach(const CTxIn& txin, vin)
+ if (!txin.scriptSig.IsPushOnly())
+ return error("nonstandard txin: %s", txin.scriptSig.ToString().c_str());
+ foreach(const CTxOut& txout, vout)
+ if (!::IsStandard(txout.scriptPubKey))
+ return error("nonstandard txout: %s", txout.scriptPubKey.ToString().c_str());
+ return true;
+ }
+
bool IsMine() const
{
foreach(const CTxOut& txout, vout)