This commit is contained in:
blackjok3r
2018-10-29 21:31:31 +08:00
parent 9dfab4e56e
commit 7a0832ebb0

View File

@@ -4307,6 +4307,8 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
LogPrintf("CheckBlockHeader komodo_check_deposit error"); LogPrintf("CheckBlockHeader komodo_check_deposit error");
return(false); return(false);
} }
if ( ASSETCHAINS_CC != 0 ) // CC contracts might refer to transactions in the current block, from a CC spend within the same block and out of order
{
int invalidtxs = 0; int invalidtxs = 0;
BOOST_FOREACH(const CTxMemPoolEntry& e, tmpmempool.mapTx) { BOOST_FOREACH(const CTxMemPoolEntry& e, tmpmempool.mapTx) {
const CTransaction &tx = e.GetTx(); const CTransaction &tx = e.GetTx();
@@ -4317,6 +4319,7 @@ bool CheckBlock(int32_t *futureblockp,int32_t height,CBlockIndex *pindex,const C
fprintf(stderr, "number of invalid txs: %d\n",invalidtxs ); fprintf(stderr, "number of invalid txs: %d\n",invalidtxs );
// empty the temp mempool for next time. // empty the temp mempool for next time.
tmpmempool.clear(); tmpmempool.clear();
}
return true; return true;
} }