Skip to content

Commit

Permalink
Merge pull request #512 from peercoin/nobrokentransactions
Browse files Browse the repository at this point in the history
let's not allow broken transactions
  • Loading branch information
peerchemist committed Feb 8, 2020
2 parents 96b3216 + 7cf0425 commit 94acc60
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/validation.cpp
Expand Up @@ -725,20 +725,8 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(chainActive.Tip(), Params().GetConsensus());
if (!CheckInputsFromMempoolAndCache(tx, state, view, pool, currentBlockScriptVerifyFlags, true, txdata))
{
// If we're using promiscuousmempoolflags, we may hit this normally
// Check if current block has some flags that scriptVerifyFlags
// does not before printing an ominous warning
if (!(~scriptVerifyFlags & currentBlockScriptVerifyFlags)) {
return error("%s: BUG! PLEASE REPORT THIS! ConnectInputs failed against latest-block but not STANDARD flags %s, %s",
__func__, hash.ToString(), FormatStateMessage(state));
} else {
if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true, false, txdata)) {
return error("%s: ConnectInputs failed against MANDATORY but not STANDARD flags due to promiscuous mempool %s, %s",
__func__, hash.ToString(), FormatStateMessage(state));
} else {
LogPrintf("Warning: -promiscuousmempool flags set to not include currently enforced soft forks, this may break mining or otherwise cause instability!\n");
}
}
return error("%s: BUG! PLEASE REPORT THIS! ConnectInputs failed against latest-block but not STANDARD flags %s, %s",
__func__, hash.ToString(), FormatStateMessage(state));
}

// Store transaction in memory
Expand Down

0 comments on commit 94acc60

Please sign in to comment.