12 #include <boost/test/unit_test.hpp> 19 GetResults(std::map<CAmount, CAccountingEntry> &results)
21 std::list<CAccountingEntry> aes;
28 results[ae.nOrderPos] = ae;
34 BOOST_TEST_MESSAGE(
"Running ACC OrderUpgrade Test");
36 std::vector<CWalletTx *> vpwtx;
39 std::map<CAmount, CAccountingEntry> results;
45 ae.
nTime = 1333333333;
53 vpwtx[0]->nTimeReceived = (
unsigned int) 1333333335;
54 vpwtx[0]->nOrderPos = -1;
56 ae.
nTime = 1333333336;
71 ae.
nTime = 1333333330;
91 wtx.
SetTx(MakeTransactionRef(std::move(tx)));
95 vpwtx[1]->nTimeReceived = (
unsigned int) 1333333336;
101 wtx.
SetTx(MakeTransactionRef(std::move(tx)));
105 vpwtx[2]->nTimeReceived = (
unsigned int) 1333333329;
106 vpwtx[2]->nOrderPos = -1;
121 ae.
nTime = 1333333334;
void SetTx(CTransactionRef arg)
int64_t nOrderPos
position in ordered transaction list
BOOST_AUTO_TEST_CASE(acc_orderupgrade_test)
CCriticalSection cs_wallet
const uint256 & GetHash() const
int64_t IncOrderPosNext(CWalletDB *pwalletdb=nullptr)
Increment the next transaction order id.
mapValue_t mapValue
Key/value map with information about the transaction.
DBErrors ReorderTransactions()
bool AddToWallet(const CWalletTx &wtxIn, bool fFlushOnClose=true)
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...
std::map< uint256, CWalletTx > mapWallet
A mutable version of CTransaction.
bool AddAccountingEntry(const CAccountingEntry &)
std::string strOtherAccount
#define BOOST_CHECK(expr)