From 5382bcf8cd23c36a435c29080770a79b5e28af42 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Mon, 13 Aug 2012 19:11:05 +0200 Subject: Multiple blocks per file Change the block storage layer again, this time with multiple files per block, but tracked by txindex.dat database entries. The file format is exactly the same as the earlier blk00001.dat, but with smaller files (128 MiB for now). The database entries track how many bytes each block file already uses, how many blocks are in it, which range of heights is present and which range of dates. --- src/db.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/db.h') diff --git a/src/db.h b/src/db.h index 798913645f..61b59060a0 100644 --- a/src/db.h +++ b/src/db.h @@ -339,6 +339,10 @@ public: bool WriteHashBestChain(uint256 hashBestChain); bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork); bool WriteBestInvalidWork(CBigNum bnBestInvalidWork); + bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo); + bool WriteBlockFileInfo(int nFile, const CBlockFileInfo &fileinfo); + bool ReadLastBlockFile(int &nFile); + bool WriteLastBlockFile(int nFile); bool LoadBlockIndex(); private: bool LoadBlockIndexGuts(); -- cgit v1.2.3