dash/src/index/disktxpos.h
fanquake 829aeff0f6
Merge #19733: Move comment about BaseIndex::DB from TxIndex::DB
8ed2f1ed78937eff0bb8b5318a30da908e33af24 Remove unused includes (Marcin Jachymiak)
cf095a53fcef8ad72e2f1177660ef50bc7e340ad Move comment about BaseIndex::DB from TxIndex::DB (Marcin Jachymiak)

Pull request description:

  Moves a comment about the `BaseIndex::DB` from the `TxIndex::DB` into the correct place. Originally part of https://github.com/bitcoin/bitcoin/pull/14053.

ACKs for top commit:
  fanquake:
    ACK 8ed2f1ed78937eff0bb8b5318a30da908e33af24

Tree-SHA512: cb4e2b916c7ab996961cc2e1d910bc4b8a1700eb32b70fc1657ca720117a7a84f7337fe5e4fb30e047aa92c31eaa976eaaa5cb8f861877f2ff6f4a59bb94f4e9
2021-09-22 23:46:26 +05:30

36 lines
837 B
C

// Copyright (c) 2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_INDEX_DISKTXPOS_H
#define BITCOIN_INDEX_DISKTXPOS_H
#include <flatfile.h>
#include <serialize.h>
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;
}
};
#endif // BITCOIN_INDEX_DISKTXPOS_H