aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2017-04-27 11:45:29 -0400
committerMatt Corallo <[email protected]>2017-06-07 11:02:36 -0400
commiteada04e778435574198b5778bf6ccc72cfcba7be (patch)
treea348b990f7bf3af62d6b98919cdd4e7f3bb7949f /src/validation.cpp
parentCache full script execution results in addition to signatures (diff)
downloaddiscoin-eada04e778435574198b5778bf6ccc72cfcba7be.tar.xz
discoin-eada04e778435574198b5778bf6ccc72cfcba7be.zip
Do not print soft-fork-script warning with -promiscuousmempool
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 9a02e9684..621077bcb 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -784,8 +784,20 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool
unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(chainActive.Tip(), Params().GetConsensus());
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",
- __func__, hash.ToString(), FormatStateMessage(state));
+ // 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");
+ }
+ }
}
// Remove conflicting transactions from the mempool