Optimisation: Store transaction list order in memory rather than compute it every need
Huge performance improvement (450%) for zapwallettxes
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user