Changeset View
Changeset View
Standalone View
Standalone View
src/txdb.h
Show All 14 Lines | |||||
#include <map> | #include <map> | ||||
#include <string> | #include <string> | ||||
#include <utility> | #include <utility> | ||||
#include <vector> | #include <vector> | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class CCoinsViewDBCursor; | class CCoinsViewDBCursor; | ||||
class uint256; | class uint256; | ||||
class Config; | |||||
namespace Consensus { | |||||
struct Params; | |||||
} | |||||
//! No need to periodic flush if at least this much space still available. | //! No need to periodic flush if at least this much space still available. | ||||
static constexpr int MAX_BLOCK_COINSDB_USAGE = 10; | static constexpr int MAX_BLOCK_COINSDB_USAGE = 10; | ||||
//! -dbcache default (MiB) | //! -dbcache default (MiB) | ||||
static const int64_t nDefaultDbCache = 450; | static const int64_t nDefaultDbCache = 450; | ||||
//! -dbbatchsize default (bytes) | //! -dbbatchsize default (bytes) | ||||
static const int64_t nDefaultDbBatchSize = 16 << 20; | static const int64_t nDefaultDbBatchSize = 16 << 20; | ||||
//! max. -dbcache (MiB) | //! max. -dbcache (MiB) | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | bool WriteBatchSync( | ||||
int nLastFile, const std::vector<const CBlockIndex *> &blockinfo); | int nLastFile, const std::vector<const CBlockIndex *> &blockinfo); | ||||
bool ReadBlockFileInfo(int nFile, CBlockFileInfo &info); | bool ReadBlockFileInfo(int nFile, CBlockFileInfo &info); | ||||
bool ReadLastBlockFile(int &nFile); | bool ReadLastBlockFile(int &nFile); | ||||
bool WriteReindexing(bool fReindexing); | bool WriteReindexing(bool fReindexing); | ||||
bool ReadReindexing(bool &fReindexing); | bool ReadReindexing(bool &fReindexing); | ||||
bool WriteFlag(const std::string &name, bool fValue); | bool WriteFlag(const std::string &name, bool fValue); | ||||
bool ReadFlag(const std::string &name, bool &fValue); | bool ReadFlag(const std::string &name, bool &fValue); | ||||
bool LoadBlockIndexGuts( | bool LoadBlockIndexGuts( | ||||
const Config &config, | const Consensus::Params ¶ms, | ||||
std::function<CBlockIndex *(const uint256 &)> insertBlockIndex); | std::function<CBlockIndex *(const uint256 &)> insertBlockIndex); | ||||
}; | }; | ||||
#endif // BITCOIN_TXDB_H | #endif // BITCOIN_TXDB_H |