Correct consensus logic in ContextualCheckInputs

Closes #2385.
This commit is contained in:
Jack Grigg 2017-05-18 13:21:00 +12:00
parent 1b786a93c3
commit 30006a2e79
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 4 additions and 3 deletions

View File

@ -1687,11 +1687,12 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins
bool ContextualCheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, const Consensus::Params& consensusParams, std::vector<CScriptCheck> *pvChecks)
{
if (!Consensus::CheckTxInputs(tx, state, inputs, GetSpendHeight(inputs), consensusParams))
return false;
if (!tx.IsCoinBase())
{
if (!Consensus::CheckTxInputs(tx, state, inputs, GetSpendHeight(inputs), consensusParams)) {
return false;
}
if (pvChecks)
pvChecks->reserve(tx.vin.size());