fix: wrong tx in tests

pull/93/merge
moneroexamples 6 years ago
parent f4917bae69
commit f01311996c

@ -366,11 +366,6 @@ MysqlTransactions::select(const uint64_t& address_id, vector<XmrTransaction>& tx
return !txs.empty();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -412,12 +407,6 @@ MysqlTransactions::insert(const XmrTransaction& tx_data)
return sr.insert_id();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
//return 0;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -439,12 +428,6 @@ MysqlTransactions::mark_spendable(const uint64_t& tx_id_no)
return sr.rows();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
// throw e;
//return 0;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -467,11 +450,6 @@ MysqlTransactions::delete_tx(const uint64_t& tx_id_no)
return sr.rows();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -501,11 +479,6 @@ MysqlTransactions::exist(const uint64_t& account_id, const string& tx_hash_str,
tx = outs.at(0);
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -558,11 +531,6 @@ MysqlPayments::select(const string& address, vector<XmrPayment>& payments)
return !payments.empty();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -585,11 +553,6 @@ MysqlPayments::select_by_payment_id(const string& payment_id, vector<XmrPayment>
return !payments.empty();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -622,12 +585,6 @@ MysqlPayments::insert(const XmrPayment& payment_data)
return sr.insert_id();
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
//return 0;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -652,12 +609,6 @@ MysqlPayments::update(XmrPayment& payment_orginal, XmrPayment& payment_new)
return sr.rows() == 1;
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
//return false;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -703,11 +654,6 @@ MySqlAccounts::select(const string& address, XmrAccount& account)
}
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);
@ -744,11 +690,6 @@ MySqlAccounts::select(const int64_t& acc_id, XmrAccount& account)
}
}
catch (mysqlpp::Exception& e)
{
MYSQL_EXCEPTION_MSG(e);
//throw e;
}
catch (std::exception& e)
{
MYSQL_EXCEPTION_MSG(e);

@ -272,7 +272,7 @@ TEST_F(MYSQL_TEST, TryInsertingExistingTxToSameAccount)
{
// we should not be able to insert same tx twice for the same account
TX_AND_ACC_FROM_HEX(tx_4b40_hex, owner_addr_5Ajfk);
TX_AND_ACC_FROM_HEX(tx_fc4_hex, owner_addr_5Ajfk);
xmreg::XmrTransaction tx_data;
@ -294,7 +294,7 @@ TEST_F(MYSQL_TEST, TryInsertingExistingTxToDifferentAccount)
// for different account we can have same tx in the Transaction table
string addres_of_different_acc {"57hGLsqr6eLjUDoqWwP3Ko9nCJ4GFN5AyezdxNXwpa1PMt6M4AbsBgcHH21hVe2MJrLGSM9C7UTqcEmyBepdhvFE4eyW3Kd"};
TX_AND_ACC_FROM_HEX(tx_4b40_hex, addres_of_different_acc);
TX_AND_ACC_FROM_HEX(tx_fc4_hex, addres_of_different_acc);
xmreg::XmrTransaction tx_data;

Loading…
Cancel
Save