Browse Source

Merge branch 'bugfix_areinpstd' of https://github.com/luke-jr/bitcoin

0.8
Gavin Andresen 13 years ago
parent
commit
b8056dc5d0
  1. 7
      src/main.cpp

7
src/main.cpp

@ -277,11 +277,8 @@ bool CTransaction::IsStandard() const @@ -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++)
{
@ -503,7 +500,7 @@ bool CTransaction::AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs, bool* pfMi @@ -503,7 +500,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();

Loading…
Cancel
Save