@@ -583,30 +583,6 @@ struct CAddressIndexIteratorHeightKey {
583583 }
584584};
585585
586- struct CDiskTxPos : public CDiskBlockPos
587- {
588- unsigned int nTxOffset; // after header
589-
590- ADD_SERIALIZE_METHODS;
591-
592- template <typename Stream, typename Operation>
593- inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
594- READWRITE (*(CDiskBlockPos*)this );
595- READWRITE (VARINT (nTxOffset));
596- }
597-
598- CDiskTxPos (const CDiskBlockPos &blockIn, unsigned int nTxOffsetIn) : CDiskBlockPos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {
599- }
600-
601- CDiskTxPos () {
602- SetNull ();
603- }
604-
605- void SetNull () {
606- CDiskBlockPos::SetNull ();
607- nTxOffset = 0 ;
608- }
609- };
610586
611587
612588/* *
@@ -752,61 +728,6 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
752728/* * Check a block is completely valid from start to finish (only works on top of our current best block, with cs_main held) */
753729bool TestBlockValidity (CValidationState& state, const CChainParams& chainparams, const CBlock& block, CBlockIndex* pindexPrev, bool fCheckPOW = true , bool fCheckMerkleRoot = true );
754730
755-
756- class CBlockFileInfo
757- {
758- public:
759- unsigned int nBlocks; // ! number of blocks stored in file
760- unsigned int nSize; // ! number of used bytes of block file
761- unsigned int nUndoSize; // ! number of used bytes in the undo file
762- unsigned int nHeightFirst; // ! lowest height of block in file
763- unsigned int nHeightLast; // ! highest height of block in file
764- uint64_t nTimeFirst; // ! earliest time of block in file
765- uint64_t nTimeLast; // ! latest time of block in file
766-
767- ADD_SERIALIZE_METHODS;
768-
769- template <typename Stream, typename Operation>
770- inline void SerializationOp (Stream& s, Operation ser_action, int nType, int nVersion) {
771- READWRITE (VARINT (nBlocks));
772- READWRITE (VARINT (nSize));
773- READWRITE (VARINT (nUndoSize));
774- READWRITE (VARINT (nHeightFirst));
775- READWRITE (VARINT (nHeightLast));
776- READWRITE (VARINT (nTimeFirst));
777- READWRITE (VARINT (nTimeLast));
778- }
779-
780- void SetNull () {
781- nBlocks = 0 ;
782- nSize = 0 ;
783- nUndoSize = 0 ;
784- nHeightFirst = 0 ;
785- nHeightLast = 0 ;
786- nTimeFirst = 0 ;
787- nTimeLast = 0 ;
788- }
789-
790- CBlockFileInfo () {
791- SetNull ();
792- }
793-
794- std::string ToString () const ;
795-
796- /* * update statistics (does not update nSize) */
797- void AddBlock (unsigned int nHeightIn, uint64_t nTimeIn) {
798- if (nBlocks==0 || nHeightFirst > nHeightIn)
799- nHeightFirst = nHeightIn;
800- if (nBlocks==0 || nTimeFirst > nTimeIn)
801- nTimeFirst = nTimeIn;
802- nBlocks++;
803- if (nHeightIn > nHeightLast)
804- nHeightLast = nHeightIn;
805- if (nTimeIn > nTimeLast)
806- nTimeLast = nTimeIn;
807- }
808- };
809-
810731/* * RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
811732class CVerifyDB {
812733public:
0 commit comments