Bitcoin Core
28.99.0
P2P Digital Currency
src
index
disktxpos.h
Go to the documentation of this file.
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
{0};
// after header
14
15
SERIALIZE_METHODS
(
CDiskTxPos
, obj)
16
{
17
READWRITE
(AsBase<FlatFilePos>(obj),
VARINT
(obj.nTxOffset));
18
}
19
20
CDiskTxPos
(
const
FlatFilePos
&blockIn,
unsigned
int
nTxOffsetIn) :
FlatFilePos
(blockIn.
nFile
, blockIn.
nPos
),
nTxOffset
(nTxOffsetIn) {
21
}
22
23
CDiskTxPos
() =
default
;
24
};
25
26
#endif
// BITCOIN_INDEX_DISKTXPOS_H
flatfile.h
serialize.h
VARINT
#define VARINT(obj)
Definition:
serialize.h:498
READWRITE
#define READWRITE(...)
Definition:
serialize.h:156
CDiskTxPos
Definition:
disktxpos.h:12
CDiskTxPos::CDiskTxPos
CDiskTxPos()=default
CDiskTxPos::SERIALIZE_METHODS
SERIALIZE_METHODS(CDiskTxPos, obj)
Definition:
disktxpos.h:15
CDiskTxPos::CDiskTxPos
CDiskTxPos(const FlatFilePos &blockIn, unsigned int nTxOffsetIn)
Definition:
disktxpos.h:20
CDiskTxPos::nTxOffset
unsigned int nTxOffset
Definition:
disktxpos.h:13
FlatFilePos
Definition:
flatfile.h:15
FlatFilePos::nFile
int nFile
Definition:
flatfile.h:16
FlatFilePos::nPos
unsigned int nPos
Definition:
flatfile.h:17
Generated on Wed Dec 18 2024 20:00:10 for Bitcoin Core by
1.9.4