bool CTransaction::RemoveFromMemoryPool()
{
    // Remove transaction from memory pool
    CRITICAL_BLOCK(cs_mapTransactions)
    {
        uint256 hash = GetHash();
        if (mapTransactions.count(hash))
        {
            BOOST_FOREACH(const CTxIn& txin, vin)
                mapNextTx.erase(txin.prevout);
            mapTransactions.erase(hash);
            nTransactionsUpdated++;
            --nPooledTx;
        }
    }
    return true;
}
bool CTransaction::RemoveFromMemoryPool()
{
     
    CRITICAL_BLOCK(cs_mapTransactions)
    {
        uint256 hash = GetHash();
        if (mapTransactions.count(hash))
        {
            BOOST_FOREACH(const CTxIn& txin, vin)
                mapNextTx.erase(txin.prevout);
            mapTransactions.erase(hash);
            nTransactionsUpdated++;
            --nPooledTx;
        }
    }
    return true;
}