Ejemplo n.º 1
0
//---------------------------------------------------------------------------------
bool tx_memory_pool::have_tx_keyimges_as_spent(const transaction& tx)
{
    CRITICAL_REGION_LOCAL(m_transactions_lock);
    BOOST_FOREACH(const auto& in, tx.vin)
    {
        CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, true);//should never fail
        if(have_tx_keyimg_as_spent(tokey_in.k_image))
            return true;
    }
    return false;
}
Ejemplo n.º 2
0
	//---------------------------------------------------------------------------------
	bool tx_memory_pool::have_tx_keyimges_as_spent(const transaction& tx)
	{
		CRITICAL_REGION_LOCAL(m_transactions_lock);
		BOOST_FOREACH(const auto& in, tx.vin)
		{
			CHECKED_GET_SPECIFIC_VARIANT(in, const txin_to_key, tokey_in, true);//should never fail
			if (have_tx_keyimg_as_spent(tokey_in.k_image))
			{
				LOG_PRINT_L2("tx_memory_pool: key img spent: " << tokey_in.k_image << ", amount: " << tokey_in.amount);
				std::stringstream ss;
				ss << "keyoffsets: ";

				BOOST_FOREACH(const auto& of, tokey_in.key_offsets)
				{
					ss << of << " ";
				}
				LOG_PRINT_L2(ss.str());
				return true;
			}
		}