diff options
| author | Luke Dashjr <[email protected]> | 2012-01-20 20:59:04 -0500 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2012-01-20 21:00:08 -0500 |
| commit | 575bdcde931c100288843a8f3540426490a78a60 (patch) | |
| tree | a0bfbf962b276a23c247cc35cb2dcd677c9a7cd2 /src/main.cpp | |
| parent | Back out spacing changes to json spirit code (diff) | |
| download | discoin-575bdcde931c100288843a8f3540426490a78a60.tar.xz discoin-575bdcde931c100288843a8f3540426490a78a60.zip | |
Sanitize AreInputsStandard slightly
Correct comment for why the check is unnecessary for coinbases
Move testnet check out, to AcceptToMemoryPool where everything else checks it
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index 891dbed98..a19cf0e33 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -277,11 +277,8 @@ bool CTransaction::IsStandard() const // 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++) { @@ -500,7 +497,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi } // 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(); |