Skip to content

Commit dc51608

Browse files
committed
Merge pull request #6447
2cb8ee9 remove unused inv from ConnectTip() (Pavel Vasin)
2 parents 3c923e8 + 2cb8ee9 commit dc51608

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,15 +2059,14 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
20592059
LogPrint("bench", " - Load block from disk: %.2fms [%.2fs]\n", (nTime2 - nTime1) * 0.001, nTimeReadFromDisk * 0.000001);
20602060
{
20612061
CCoinsViewCache view(pcoinsTip);
2062-
CInv inv(MSG_BLOCK, pindexNew->GetBlockHash());
20632062
bool rv = ConnectBlock(*pblock, state, pindexNew, view);
20642063
GetMainSignals().BlockChecked(*pblock, state);
20652064
if (!rv) {
20662065
if (state.IsInvalid())
20672066
InvalidBlockFound(pindexNew, state);
20682067
return error("ConnectTip(): ConnectBlock %s failed", pindexNew->GetBlockHash().ToString());
20692068
}
2070-
mapBlockSource.erase(inv.hash);
2069+
mapBlockSource.erase(pindexNew->GetBlockHash());
20712070
nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2;
20722071
LogPrint("bench", " - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001);
20732072
assert(view.Flush());

0 commit comments

Comments
 (0)