aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-08-24 12:14:48 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-08-24 12:15:12 +0200
commit65ce215641a213cd085671a32c62cb35a9d1de62 (patch)
tree43fdeb90768519f725a5df74c0293b3bcd3032ef /src
parentc68c4bc7a45529735c868428632906d3c20a175a (diff)
downloadbitcoin-65ce215641a213cd085671a32c62cb35a9d1de62.tar.xz
Make 0-value outputs non-standard
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 56596ef183..f71cfe7caa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -281,9 +281,12 @@ bool CTransaction::IsStandard() const
if (!txin.scriptSig.IsPushOnly())
return false;
}
- BOOST_FOREACH(const CTxOut& txout, vout)
+ BOOST_FOREACH(const CTxOut& txout, vout) {
if (!::IsStandard(txout.scriptPubKey))
return false;
+ if (txout.nValue == 0)
+ return false;
+ }
return true;
}