Changeset View
Changeset View
Standalone View
Standalone View
src/blockdb.cpp
#include <blockdb.h> | #include <blockdb.h> | ||||
#include <blockindex.h> | #include <blockindex.h> | ||||
#include <clientversion.h> | #include <clientversion.h> | ||||
#include <pow/pow.h> | #include <pow/pow.h> | ||||
#include <primitives/block.h> | #include <primitives/block.h> | ||||
#include <streams.h> | #include <streams.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
extern RecursiveMutex cs_main; | extern RecursiveMutex cs_main; | ||||
FlatFileSeq BlockFileSeq() { | FlatFileSeq BlockFileSeq() { | ||||
return FlatFileSeq(GetBlocksDir(), "blk", BLOCKFILE_CHUNK_SIZE); | return FlatFileSeq(gArgs.GetBlocksDirPath(), "blk", BLOCKFILE_CHUNK_SIZE); | ||||
} | } | ||||
FlatFileSeq UndoFileSeq() { | FlatFileSeq UndoFileSeq() { | ||||
return FlatFileSeq(GetBlocksDir(), "rev", UNDOFILE_CHUNK_SIZE); | return FlatFileSeq(gArgs.GetBlocksDirPath(), "rev", UNDOFILE_CHUNK_SIZE); | ||||
} | } | ||||
FILE *OpenBlockFile(const FlatFilePos &pos, bool fReadOnly) { | FILE *OpenBlockFile(const FlatFilePos &pos, bool fReadOnly) { | ||||
return BlockFileSeq().Open(pos, fReadOnly); | return BlockFileSeq().Open(pos, fReadOnly); | ||||
} | } | ||||
/** Open an undo file (rev?????.dat) */ | /** Open an undo file (rev?????.dat) */ | ||||
FILE *OpenUndoFile(const FlatFilePos &pos, bool fReadOnly) { | FILE *OpenUndoFile(const FlatFilePos &pos, bool fReadOnly) { | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |