src/validation.cpp
// A transaction that spends outputs that would be replaced by it is invalid. Now
// that we have the set of all ancestors we can detect this
// pathological case by making sure setConflicts and setAncestors don't
// intersect.
A transaction that spends outputs that would be replaced by it is invalid. Now
that we have the set of all ancestors we can detect this
pathological case by making sure setConflicts and setAncestors don't
intersect.
A transaction that spends outputs that would be replaced by it is invalid . Now that we have the set of all ancestors we can detect this pathological case by making sure setConflicts and setAncestors don ' t intersect .
BOOST_FOREACH(CTxMemPool::txiter ancestorIt, setAncestors)
		{
			const uint256 &hashAncestor = ancestorIt->GetTx().GetHash();
			if (setConflicts.count(hashAncestor))
			{
				return state.DoS(10, false,
					REJECT_INVALID, "bad-txns-spends-conflicting-tx", false,
					strprintf("%s spends conflicting transaction %s",
						hash.ToString(),
						hashAncestor.ToString()));
			}
		}
BOOST_FOREACH ( CTxMemPool :: txiter ancestorIt , setAncestors ) { const uint256 & hashAncestor = ancestorIt -> GetTx ( ) . GetHash ( ) ; if ( setConflicts . count ( hashAncestor ) ) { return state . DoS ( 10 , false , REJECT_INVALID , " " , false , strprintf ( " " , hash . ToString ( ) , hashAncestor . ToString ( ) ) ) ; } }
A transaction that spends outputs that would be replaced by it is invalid.
A transaction that spends outputs that would be replaced by it is invalid .