Only store transactions with missing inputs in the orphan pool.

All previous versions of bitcoin could store some types of
invalid transactions in the orphan-transaction list.
This commit is contained in:
Gavin Andresen
2012-01-18 13:36:44 -05:00
parent dc77dce07c
commit 149f580c82
2 changed files with 22 additions and 7 deletions

View File

@@ -684,10 +684,11 @@ public:
@param[in] fBlock True if being called to add a new best-block to the chain
@param[in] fMiner True if being called by CreateNewBlock
@param[out] inputsRet Pointers to this transaction's inputs
@param[out] fInvalid returns true if transaction is invalid
@return Returns true if all inputs are in txdb or mapTestPool
*/
bool FetchInputs(CTxDB& txdb, const std::map<uint256, CTxIndex>& mapTestPool,
bool fBlock, bool fMiner, MapPrevTx& inputsRet);
bool fBlock, bool fMiner, MapPrevTx& inputsRet, bool& fInvalid);
/** Sanity check previous transactions, then, if all checks succeed,
mark them as spent by this transaction.