diff options
author | Marcin Jachymiak <marcin.jachymiak1@gmail.com> | 2019-01-20 14:17:17 -0500 |
---|---|---|
committer | Marcin Jachymiak <marcin.jachymiak1@gmail.com> | 2020-08-15 18:23:55 -0400 |
commit | 7668db3b08531a590089d66cc5c91f1fb3afbfcc (patch) | |
tree | 951caac4c35a70a7a693c0c372a1d82ffcdc787b /src/index/txindex.cpp | |
parent | 3ab2582c7fe76d2839ab493512758d5601903c86 (diff) | |
download | bitcoin-7668db3b08531a590089d66cc5c91f1fb3afbfcc.tar.xz |
Move only: Move CDiskTxPos to its own file
Diffstat (limited to 'src/index/txindex.cpp')
-rw-r--r-- | src/index/txindex.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index 64472714cc..104b05d4ba 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <index/disktxpos.h> #include <index/txindex.h> #include <node/ui_interface.h> #include <shutdown.h> @@ -15,29 +16,6 @@ constexpr char DB_TXINDEX_BLOCK = 'T'; std::unique_ptr<TxIndex> g_txindex; -struct CDiskTxPos : public FlatFilePos -{ - unsigned int nTxOffset; // after header - - SERIALIZE_METHODS(CDiskTxPos, obj) - { - READWRITEAS(FlatFilePos, obj); - READWRITE(VARINT(obj.nTxOffset)); - } - - CDiskTxPos(const FlatFilePos &blockIn, unsigned int nTxOffsetIn) : FlatFilePos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) { - } - - CDiskTxPos() { - SetNull(); - } - - void SetNull() { - FlatFilePos::SetNull(); - nTxOffset = 0; - } -}; - /** * Access to the txindex database (indexes/txindex/) * |