Changeset View
Changeset View
Standalone View
Standalone View
src/index/txindex.cpp
Show All 17 Lines | |||||
constexpr char DB_TXINDEX = 't'; | constexpr char DB_TXINDEX = 't'; | ||||
constexpr char DB_TXINDEX_BLOCK = 'T'; | constexpr char DB_TXINDEX_BLOCK = 'T'; | ||||
std::unique_ptr<TxIndex> g_txindex; | std::unique_ptr<TxIndex> g_txindex; | ||||
struct CDiskTxPos : public FlatFilePos { | struct CDiskTxPos : public FlatFilePos { | ||||
unsigned int nTxOffset; // after header | unsigned int nTxOffset; // after header | ||||
ADD_SERIALIZE_METHODS; | SERIALIZE_METHODS(CDiskTxPos, obj) { | ||||
READWRITEAS(FlatFilePos, obj); | |||||
template <typename Stream, typename Operation> | READWRITE(VARINT(obj.nTxOffset)); | ||||
inline void SerializationOp(Stream &s, Operation ser_action) { | |||||
READWRITEAS(FlatFilePos, *this); | |||||
READWRITE(VARINT(nTxOffset)); | |||||
} | } | ||||
CDiskTxPos(const FlatFilePos &blockIn, unsigned int nTxOffsetIn) | CDiskTxPos(const FlatFilePos &blockIn, unsigned int nTxOffsetIn) | ||||
: FlatFilePos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {} | : FlatFilePos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {} | ||||
CDiskTxPos() { SetNull(); } | CDiskTxPos() { SetNull(); } | ||||
void SetNull() { | void SetNull() { | ||||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |