Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/test/accounting_tests.cpp
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | BOOST_AUTO_TEST_CASE(acc_orderupgrade) { | ||||
BOOST_CHECK(results[2 * SATOSHI].nTime == 1333333336); | BOOST_CHECK(results[2 * SATOSHI].nTime == 1333333336); | ||||
BOOST_CHECK(results[3 * SATOSHI].nTime == 1333333330); | BOOST_CHECK(results[3 * SATOSHI].nTime == 1333333330); | ||||
BOOST_CHECK(results[3 * SATOSHI].strComment.empty()); | BOOST_CHECK(results[3 * SATOSHI].strComment.empty()); | ||||
wtx.mapValue["comment"] = "y"; | wtx.mapValue["comment"] = "y"; | ||||
{ | { | ||||
CMutableTransaction tx(*wtx.tx); | CMutableTransaction tx(*wtx.tx); | ||||
// Just to change the hash :) | // Just to change the hash :) | ||||
--tx.nLockTime; | ++tx.nLockTime; | ||||
wtx.SetTx(MakeTransactionRef(std::move(tx))); | wtx.SetTx(MakeTransactionRef(std::move(tx))); | ||||
} | } | ||||
m_wallet.AddToWallet(wtx); | m_wallet.AddToWallet(wtx); | ||||
vpwtx.push_back(&m_wallet.mapWallet.at(wtx.GetId())); | vpwtx.push_back(&m_wallet.mapWallet.at(wtx.GetId())); | ||||
vpwtx[1]->nTimeReceived = (unsigned int)1333333336; | vpwtx[1]->nTimeReceived = (unsigned int)1333333336; | ||||
wtx.mapValue["comment"] = "x"; | wtx.mapValue["comment"] = "x"; | ||||
{ | { | ||||
CMutableTransaction tx(*wtx.tx); | CMutableTransaction tx(*wtx.tx); | ||||
// Just to change the hash :) | // Just to change the hash :) | ||||
--tx.nLockTime; | ++tx.nLockTime; | ||||
wtx.SetTx(MakeTransactionRef(std::move(tx))); | wtx.SetTx(MakeTransactionRef(std::move(tx))); | ||||
} | } | ||||
m_wallet.AddToWallet(wtx); | m_wallet.AddToWallet(wtx); | ||||
vpwtx.push_back(&m_wallet.mapWallet.at(wtx.GetId())); | vpwtx.push_back(&m_wallet.mapWallet.at(wtx.GetId())); | ||||
vpwtx[2]->nTimeReceived = (unsigned int)1333333329; | vpwtx[2]->nTimeReceived = (unsigned int)1333333329; | ||||
vpwtx[2]->nOrderPos = -1; | vpwtx[2]->nOrderPos = -1; | ||||
GetResults(m_wallet, results); | GetResults(m_wallet, results); | ||||
Show All 32 Lines |