LCOV - code coverage report
Current view: top level - src/consensus - consensus.h (source / functions) Hit Total Coverage
Test: test_dash_coverage.info Lines: 4 4 100.0 %
Date: 2026-06-25 07:23:51 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // Copyright (c) 2009-2010 Satoshi Nakamoto
       2             : // Copyright (c) 2009-2015 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_CONSENSUS_CONSENSUS_H
       7             : #define BITCOIN_CONSENSUS_CONSENSUS_H
       8             : 
       9             : /** The maximum allowed size for a serialized block, in bytes (network rule) */
      10             : static const unsigned int MAX_LEGACY_BLOCK_SIZE = 1000000;
      11             : static const unsigned int MAX_DIP0001_BLOCK_SIZE = 2000000;
      12      449856 : inline unsigned int MaxBlockSize(bool fDIP0001Active = true)
      13             : {
      14      449856 :     return fDIP0001Active ? MAX_DIP0001_BLOCK_SIZE : MAX_LEGACY_BLOCK_SIZE;
      15             : }
      16             : /** The maximum allowed number of signature check operations in a block (network rule) */
      17      226878 : inline unsigned int MaxBlockSigOps(bool fDIP0001Active = true)
      18             : {
      19      226878 :     return MaxBlockSize(fDIP0001Active) / 50;
      20             : }
      21             : /** The maximum allowed size of version 3 extra payload */
      22             : static const unsigned int MAX_TX_EXTRA_PAYLOAD = 10000;
      23             : /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
      24             : static const int COINBASE_MATURITY = 100;
      25             : 
      26             : /** Flags for nSequence and nLockTime locks */
      27             : /** Interpret sequence numbers as relative lock-time constraints. */
      28             : static constexpr unsigned int LOCKTIME_VERIFY_SEQUENCE = (1 << 0);
      29             : 
      30             : #endif // BITCOIN_CONSENSUS_CONSENSUS_H

Generated by: LCOV version 1.16