changeset 3389:91aa64a28563 draft

Merge branch 'nozeroout' of git://github.com/sipa/bitcoin
author Gavin Andresen <gavinandresen@gmail.com>
date Sat, 25 Aug 2012 11:05:59 -0400
parents 21a9e68cdbcd (current diff) d042c8f32b42 (diff)
children 38aad20ac721
files
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -281,9 +281,12 @@
         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;
 }