aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-11-02 02:01:45 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2015-11-02 02:01:45 +0100
commit69d373ff6693de204bdf58cbc90f8a26d8f711c8 (patch)
treec71f3c98d9f7ea950516e4fa80aa1dfe355be0b5
parent0b9e9dca4e88e41f7dae4fd9cd8e0f93fabafe01 (diff)
Don't wipe the sigcache in TestBlockValidity
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index e038fe3663..ad19b50ce4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1830,7 +1830,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
nFees += view.GetValueIn(tx)-tx.GetValueOut();
std::vector<CScriptCheck> vChecks;
- if (!CheckInputs(tx, state, view, fScriptChecks, flags, false, nScriptCheckThreads ? &vChecks : NULL))
+ bool fCacheResults = fJustCheck; /* Don't cache results if we're actually connecting blocks (still consult the cache, though) */
+ if (!CheckInputs(tx, state, view, fScriptChecks, flags, fCacheResults, nScriptCheckThreads ? &vChecks : NULL))
return error("ConnectBlock(): CheckInputs on %s failed with %s",
tx.GetHash().ToString(), FormatStateMessage(state));
control.Add(vChecks);