changeset 1782:bd04dd07d875 draft

Merge branch 'bugfix_areinpstd' of https://github.com/luke-jr/bitcoin
author Gavin Andresen <gavinandresen@gmail.com>
date Mon, 23 Jan 2012 13:09:34 -0500
parents 67d2dbff4c26 (current diff) f339d23c2b7f (diff)
children f05defb6245e
files src/main.cpp
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -277,11 +277,8 @@
 //
 bool CTransaction::AreInputsStandard(const MapPrevTx& mapInputs) const
 {
-    if (fTestNet)
-        return true; // Allow non-standard on testnet
-
     if (IsCoinBase())
-        return true; // Coinbases are allowed to have any input
+        return true; // Coinbases don't use vin normally
 
     for (int i = 0; i < vin.size(); i++)
     {
@@ -503,7 +500,7 @@
         }
 
         // Check for non-standard pay-to-script-hash in inputs
-        if (!AreInputsStandard(mapInputs))
+        if (!AreInputsStandard(mapInputs) && !fTestNet)
             return error("AcceptToMemoryPool() : nonstandard transaction input");
 
         int64 nFees = GetValueIn(mapInputs)-GetValueOut();