LCOV - code coverage report
Current view: top level - src/index - disktxpos.h (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 13 13 100.0 %
Date: 2022-04-21 14:51:19 Functions: 5 5 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) 2019-2020 The Bitcoin Core developers
#       2                 :            : // Distributed under the MIT software license, see the accompanying
#       3                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#       4                 :            : 
#       5                 :            : #ifndef BITCOIN_INDEX_DISKTXPOS_H
#       6                 :            : #define BITCOIN_INDEX_DISKTXPOS_H
#       7                 :            : 
#       8                 :            : #include <flatfile.h>
#       9                 :            : #include <serialize.h>
#      10                 :            : 
#      11                 :            : struct CDiskTxPos : public FlatFilePos
#      12                 :            : {
#      13                 :            :     unsigned int nTxOffset; // after header
#      14                 :            : 
#      15                 :            :     SERIALIZE_METHODS(CDiskTxPos, obj)
#      16                 :       1947 :     {
#      17                 :       1947 :         READWRITEAS(FlatFilePos, obj);
#      18                 :       1947 :         READWRITE(VARINT(obj.nTxOffset));
#      19                 :       1947 :     }
#      20                 :            : 
#      21                 :       1620 :     CDiskTxPos(const FlatFilePos &blockIn, unsigned int nTxOffsetIn) : FlatFilePos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {
#      22                 :       1620 :     }
#      23                 :            : 
#      24                 :        444 :     CDiskTxPos() {
#      25                 :        444 :         SetNull();
#      26                 :        444 :     }
#      27                 :            : 
#      28                 :        444 :     void SetNull() {
#      29                 :        444 :         FlatFilePos::SetNull();
#      30                 :        444 :         nTxOffset = 0;
#      31                 :        444 :     }
#      32                 :            : };
#      33                 :            : 
#      34                 :            : 
#      35                 :            : #endif // BITCOIN_INDEX_DISKTXPOS_H

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