aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2015-10-19 09:19:38 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2015-11-21 01:48:25 +0000
commit3e7c89196ceb2742b62cd183d6fab74edc40647a (patch)
treee1e14d18e88a0a88015e7c3c4642659b3b018487 /src/test
parenteac53ec992018a14db6f8a65a7ce333a4c8284cc (diff)
Optimisation: Store transaction list order in memory rather than compute it every need
Huge performance improvement (450%) for zapwallettxes
Diffstat (limited to 'src/test')
-rw-r--r--src/test/accounting_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp
index 0c2ade48d6..4a294c6712 100644
--- a/src/test/accounting_tests.cpp
+++ b/src/test/accounting_tests.cpp
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333333;
ae.strOtherAccount = "b";
ae.strComment = "";
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
wtx.mapValue["comment"] = "z";
pwalletMain->AddToWallet(wtx, false, &walletdb);
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333336;
ae.strOtherAccount = "c";
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
GetResults(walletdb, results);
@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333330;
ae.strOtherAccount = "d";
ae.nOrderPos = pwalletMain->IncOrderPosNext();
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
GetResults(walletdb, results);
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333334;
ae.strOtherAccount = "e";
ae.nOrderPos = -1;
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
GetResults(walletdb, results);