aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-11-12 17:37:42 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-11-12 17:37:52 +0100
commiteb6172a8ca7e0474457c1206c9907514348243ea (patch)
treea1c38ef1b59210deb1c2d60ebe0d13869f48efe6 /src/main.cpp
parent54e8bfec8387ee154f8b15b41ae0b29bc2cd9bbc (diff)
parent69d373ff6693de204bdf58cbc90f8a26d8f711c8 (diff)
downloadbitcoin-eb6172a8ca7e0474457c1206c9907514348243ea.tar.xz
Merge pull request #6918
69d373f Don't wipe the sigcache in TestBlockValidity (Pieter Wuille) 0b9e9dc Evict sigcache entries that are seen in a block (Pieter Wuille) 830e3f3 Make sigcache faster and more efficient (Pieter Wuille)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6e5a81f306..3703701917 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1851,7 +1851,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);