LCOV - code coverage report
Current view: top level - src/script - sigcache.h (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 1 1 100.0 %
Date: 2022-04-21 14:51:19 Functions: 1 1 100.0 %
Legend: Modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed

Not modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed
Branches: 0 0 -

           Branch data     Line data    Source code
#       1                 :            : // Copyright (c) 2009-2010 Satoshi Nakamoto
#       2                 :            : // Copyright (c) 2009-2021 The Bitcoin Core developers
#       3                 :            : // Distributed under the MIT software license, see the accompanying
#       4                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#       5                 :            : 
#       6                 :            : #ifndef BITCOIN_SCRIPT_SIGCACHE_H
#       7                 :            : #define BITCOIN_SCRIPT_SIGCACHE_H
#       8                 :            : 
#       9                 :            : #include <script/interpreter.h>
#      10                 :            : #include <span.h>
#      11                 :            : #include <util/hasher.h>
#      12                 :            : 
#      13                 :            : #include <vector>
#      14                 :            : 
#      15                 :            : // DoS prevention: limit cache size to 32MB (over 1000000 entries on 64-bit
#      16                 :            : // systems). Due to how we count cache size, actual memory usage is slightly
#      17                 :            : // more (~32.25 MB)
#      18                 :            : static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 32;
#      19                 :            : // Maximum sig cache size allowed
#      20                 :            : static const int64_t MAX_MAX_SIG_CACHE_SIZE = 16384;
#      21                 :            : 
#      22                 :            : class CPubKey;
#      23                 :            : 
#      24                 :            : class CachingTransactionSignatureChecker : public TransactionSignatureChecker
#      25                 :            : {
#      26                 :            : private:
#      27                 :            :     bool store;
#      28                 :            : 
#      29                 :            : public:
#      30                 :     390537 :     CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amountIn, bool storeIn, PrecomputedTransactionData& txdataIn) : TransactionSignatureChecker(txToIn, nInIn, amountIn, txdataIn, MissingDataBehavior::ASSERT_FAIL), store(storeIn) {}
#      31                 :            : 
#      32                 :            :     bool VerifyECDSASignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const override;
#      33                 :            :     bool VerifySchnorrSignature(Span<const unsigned char> sig, const XOnlyPubKey& pubkey, const uint256& sighash) const override;
#      34                 :            : };
#      35                 :            : 
#      36                 :            : void InitSignatureCache();
#      37                 :            : 
#      38                 :            : #endif // BITCOIN_SCRIPT_SIGCACHE_H

Generated by: LCOV version 0-eol-96201-ge66f56f4af6a