validation: Extract basic block file logic into FlatFileSeq class.

This commit is contained in:
Jim Posen
2019-01-06 11:06:31 -08:00
parent 62e7addb63
commit 9183d6ef65
6 changed files with 80 additions and 6 deletions

View File

@@ -245,7 +245,7 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, CValidationS
/** Open a block file (blk?????.dat) */
FILE* OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false);
/** Translation to a filesystem path */
fs::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix);
fs::path GetBlockPosFilename(const CDiskBlockPos &pos);
/** Import blocks from an external file */
bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskBlockPos *dbp = nullptr);
/** Ensures we have a genesis block in the block tree, possibly writing one to disk. */