aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
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)