diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-06-29 20:04:07 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-06-29 20:19:21 +0200 |
commit | 2935b469ae96a3203bb997a6eddc098903b336ce (patch) | |
tree | d1eed14578449c76e5b623f3e8bd5e3cff278908 /src/script/sigcache.cpp | |
parent | 0c3542e5dec34f43e0c2e171eb52cc95d19c070e (diff) | |
parent | e3f9c05b966622146e090f2a01a913516ccb874a (diff) |
Merge #10192: Cache full script execution results in addition to signatures
e3f9c05 Add CheckInputs() unit tests (Suhas Daftuar)
a3543af Better document CheckInputs parameter meanings (Matt Corallo)
309ee1a Update -maxsigcachesize doc clarify init logprints for it (Matt Corallo)
b014668 Add CheckInputs wrapper CCoinsViewMemPool -> non-consensus-critical (Matt Corallo)
eada04e Do not print soft-fork-script warning with -promiscuousmempool (Matt Corallo)
b5fea8d Cache full script execution results in addition to signatures (Matt Corallo)
6d22b2b Pull script verify flags calculation out of ConnectBlock (Matt Corallo)
Tree-SHA512: 0c6c3c79c64fcb21e17ab60290c5c96d4fac11624c49f841a4201eec21cb480314c52a07d1e3abd4f9c764785cc57bfd178511f495aa0469addb204e96214fe4
Diffstat (limited to 'src/script/sigcache.cpp')
-rw-r--r-- | src/script/sigcache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp index befc5f5233..ceb573b2ec 100644 --- a/src/script/sigcache.cpp +++ b/src/script/sigcache.cpp @@ -74,10 +74,10 @@ void InitSignatureCache() { // nMaxCacheSize is unsigned. If -maxsigcachesize is set to zero, // setup_bytes creates the minimum possible cache (2 elements). - size_t nMaxCacheSize = std::min(std::max((int64_t)0, GetArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE)), MAX_MAX_SIG_CACHE_SIZE) * ((size_t) 1 << 20); + size_t nMaxCacheSize = std::min(std::max((int64_t)0, GetArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE) / 2), MAX_MAX_SIG_CACHE_SIZE) * ((size_t) 1 << 20); size_t nElems = signatureCache.setup_bytes(nMaxCacheSize); - LogPrintf("Using %zu MiB out of %zu requested for signature cache, able to store %zu elements\n", - (nElems*sizeof(uint256)) >>20, nMaxCacheSize>>20, nElems); + LogPrintf("Using %zu MiB out of %zu/2 requested for signature cache, able to store %zu elements\n", + (nElems*sizeof(uint256)) >>20, (nMaxCacheSize*2)>>20, nElems); } bool CachingTransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const |