mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Do not print soft-fork-script warning with -promiscuousmempool
This commit is contained in:
parent
b5fea8d0cc
commit
eada04e778
@ -784,8 +784,20 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
|
|||||||
unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(chainActive.Tip(), Params().GetConsensus());
|
unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(chainActive.Tip(), Params().GetConsensus());
|
||||||
if (!CheckInputs(tx, state, view, true, currentBlockScriptVerifyFlags, true, true, txdata))
|
if (!CheckInputs(tx, state, view, true, currentBlockScriptVerifyFlags, true, true, txdata))
|
||||||
{
|
{
|
||||||
return error("%s: BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s, %s",
|
// If we're using promiscuousmempoolflags, we may hit this normally
|
||||||
__func__, hash.ToString(), FormatStateMessage(state));
|
// 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove conflicting transactions from the mempool
|
// Remove conflicting transactions from the mempool
|
||||||
|
Loading…
Reference in New Issue
Block a user