Skip to content

Commit 69d373f

Browse files
committed
Don't wipe the sigcache in TestBlockValidity
1 parent 0b9e9dc commit 69d373f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
18301830
nFees += view.GetValueIn(tx)-tx.GetValueOut();
18311831

18321832
std::vector<CScriptCheck> vChecks;
1833-
if (!CheckInputs(tx, state, view, fScriptChecks, flags, false, nScriptCheckThreads ? &vChecks : NULL))
1833+
bool fCacheResults = fJustCheck; /* Don't cache results if we're actually connecting blocks (still consult the cache, though) */
1834+
if (!CheckInputs(tx, state, view, fScriptChecks, flags, fCacheResults, nScriptCheckThreads ? &vChecks : NULL))
18341835
return error("ConnectBlock(): CheckInputs on %s failed with %s",
18351836
tx.GetHash().ToString(), FormatStateMessage(state));
18361837
control.Add(vChecks);

0 commit comments

Comments
 (0)