IsStandard() check for CScripts: only relay/include in blocks CScripts we can understand.
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@197 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
11
main.h
11
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)
|
||||
|
||||
Reference in New Issue
Block a user