mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 12:43:30 +01:00
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.
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user