aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactiondesc.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-07-06 16:33:34 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-10-20 23:08:57 +0200
commitae8bfd12daa802d20791e69d3477e799d2b99f45 (patch)
tree848867135da5954b7155ebe98c09db66d09d5737 /src/qt/transactiondesc.cpp
parent450cbb0944cd20a06ce806e6679a1f4c83c50db2 (diff)
downloadbitcoin-ae8bfd12daa802d20791e69d3477e799d2b99f45.tar.xz
Batch block connection during IBD
During the initial block download (or -loadblock), delay connection of new blocks a bit, and perform them in a single action. This reduces the load on the database engine, as subsequent blocks often update an earlier block's transaction already.
Diffstat (limited to 'src/qt/transactiondesc.cpp')
-rw-r--r--src/qt/transactiondesc.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index dc840b9f8d..e358c12e96 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -234,9 +234,6 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
- CCoinsDB coindb("r"); // To fetch source txouts
- CCoinsViewDB coins(coindb);
-
strHTML += "<br><b>" + tr("Inputs") + ":</b>";
strHTML += "<ul>";
@@ -247,7 +244,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
COutPoint prevout = txin.prevout;
CCoins prev;
- if(coins.GetCoins(prevout.hash, prev))
+ if(pcoinsTip->GetCoins(prevout.hash, prev))
{
if (prevout.n < prev.vout.size())
{