forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move only: Move CDiskTxPos to its own file
- Loading branch information
Showing
3 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// 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 <chain.h> | ||
#include <flatfile.h> | ||
#include <primitives/block.h> | ||
#include <primitives/transaction.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters