11 #include <boost/test/unit_test.hpp> 18 std::list<CAccountingEntry> aes;
25 results[ae.nOrderPos] = ae;
31 std::vector<CWalletTx*> vpwtx;
34 std::map<CAmount, CAccountingEntry> results;
36 LOCK(m_wallet.cs_wallet);
40 ae.
nTime = 1333333333;
43 m_wallet.AddAccountingEntry(ae);
46 m_wallet.AddToWallet(wtx);
47 vpwtx.push_back(&m_wallet.mapWallet[wtx.
GetHash()]);
48 vpwtx[0]->nTimeReceived = (
unsigned int)1333333335;
49 vpwtx[0]->nOrderPos = -1;
51 ae.
nTime = 1333333336;
53 m_wallet.AddAccountingEntry(ae);
66 ae.
nTime = 1333333330;
68 ae.
nOrderPos = m_wallet.IncOrderPosNext();
69 m_wallet.AddAccountingEntry(ae);
88 m_wallet.AddToWallet(wtx);
89 vpwtx.push_back(&m_wallet.mapWallet[wtx.
GetHash()]);
90 vpwtx[1]->nTimeReceived = (
unsigned int)1333333336;
98 m_wallet.AddToWallet(wtx);
99 vpwtx.push_back(&m_wallet.mapWallet[wtx.
GetHash()]);
100 vpwtx[2]->nTimeReceived = (
unsigned int)1333333329;
101 vpwtx[2]->nOrderPos = -1;
116 ae.
nTime = 1333333334;
119 m_wallet.AddAccountingEntry(ae);
void SetTx(CTransactionRef arg)
int64_t nOrderPos
position in ordered transaction list
const uint256 & GetHash() const
BOOST_AUTO_TEST_CASE(acc_orderupgrade)
mapValue_t mapValue
Key/value map with information about the transaction.
static void GetResults(CWallet &wallet, std::map< CAmount, CAccountingEntry > &results)
static CTransactionRef MakeTransactionRef()
DBErrors ReorderTransactions()
A transaction with a bunch of additional info that only the owner cares about.
#define BOOST_FIXTURE_TEST_SUITE(a, b)
Testing setup and teardown for wallet.
void ListAccountCreditDebit(const std::string &strAccount, std::list< CAccountingEntry > &entries)
#define BOOST_AUTO_TEST_SUITE_END()
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
A mutable version of CTransaction.
std::string strOtherAccount
#define BOOST_CHECK(expr)