Mempool CC test

This commit is contained in:
jl777
2018-08-27 09:31:56 -11:00
parent 64305d3df1
commit 2d44c20272

View File

@@ -1530,17 +1530,19 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
// XXX: is this neccesary for CryptoConditions? // XXX: is this neccesary for CryptoConditions?
if ( KOMODO_CONNECTING <= 0 && chainActive.LastTip() != 0 ) if ( KOMODO_CONNECTING <= 0 && chainActive.LastTip() != 0 )
{ {
flag = 1; //flag = 1;
KOMODO_CONNECTING = (1<<30) + (int32_t)chainActive.LastTip()->nHeight + 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 (!ContextualCheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true, txdata, Params().GetConsensus(), consensusBranchId))
{ {
if ( flag != 0 ) if ( flag != 0 )
KOMODO_CONNECTING = -1; 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()); return error("AcceptToMemoryPool: BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s", hash.ToString());
} }
if ( flag != 0 ) if ( flag != 0 )
KOMODO_CONNECTING = -1; KOMODO_CONNECTING = -1;
else KOMODO_CONNECTING &= ~(1<<30);
// Store transaction in memory // Store transaction in memory
if ( komodo_is_notarytx(tx) == 0 ) if ( komodo_is_notarytx(tx) == 0 )
@@ -3468,7 +3470,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
{ {
CCoinsViewCache view(pcoinsTip); CCoinsViewCache view(pcoinsTip);
bool rv = ConnectBlock(*pblock, state, pindexNew, view, false, true); bool rv = ConnectBlock(*pblock, state, pindexNew, view, false, true);
KOMODO_CONNECTING = -1; //KOMODO_CONNECTING = -1;
GetMainSignals().BlockChecked(*pblock, state); GetMainSignals().BlockChecked(*pblock, state);
if (!rv) { if (!rv) {
if (state.IsInvalid()) if (state.IsInvalid())