From 2d44c20272cba4d922943182749c822386505963 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 27 Aug 2018 09:31:56 -1100 Subject: [PATCH] Mempool CC test --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 85de0effa..e27738e04 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1530,18 +1530,20 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa // XXX: is this neccesary for CryptoConditions? if ( KOMODO_CONNECTING <= 0 && chainActive.LastTip() != 0 ) { - flag = 1; + //flag = 1; KOMODO_CONNECTING = (1<<30) + (int32_t)chainActive.LastTip()->nHeight + 1; } if (!ContextualCheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true, txdata, Params().GetConsensus(), consensusBranchId)) { if ( flag != 0 ) KOMODO_CONNECTING = -1; + else KOMODO_CONNECTING &= ~(1<<30); return error("AcceptToMemoryPool: BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s", hash.ToString()); } if ( flag != 0 ) KOMODO_CONNECTING = -1; - + else KOMODO_CONNECTING &= ~(1<<30); + // Store transaction in memory if ( komodo_is_notarytx(tx) == 0 ) KOMODO_ON_DEMAND++; @@ -3468,7 +3470,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock * { CCoinsViewCache view(pcoinsTip); bool rv = ConnectBlock(*pblock, state, pindexNew, view, false, true); - KOMODO_CONNECTING = -1; + //KOMODO_CONNECTING = -1; GetMainSignals().BlockChecked(*pblock, state); if (!rv) { if (state.IsInvalid())