aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/txdb.h')
-rw-r--r--src/txdb.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/txdb.h b/src/txdb.h
index b555be3de7..7ce6585d37 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -2,31 +2,41 @@
// Copyright (c) 2009-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#ifndef BITCOIN_TXDB_LEVELDB_H
#define BITCOIN_TXDB_LEVELDB_H
+#include "leveldbwrapper.h"
#include "main.h"
-#include "leveldb.h"
+
+#include <map>
+#include <string>
+#include <utility>
+#include <vector>
+
+class CBigNum;
+class CCoins;
+class uint256;
/** CCoinsView backed by the LevelDB coin database (chainstate/) */
class CCoinsViewDB : public CCoinsView
{
protected:
- CLevelDB db;
+ CLevelDBWrapper db;
public:
CCoinsViewDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
bool GetCoins(const uint256 &txid, CCoins &coins);
bool SetCoins(const uint256 &txid, const CCoins &coins);
bool HaveCoins(const uint256 &txid);
- CBlockIndex *GetBestBlock();
- bool SetBestBlock(CBlockIndex *pindex);
- bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, CBlockIndex *pindex);
+ uint256 GetBestBlock();
+ bool SetBestBlock(const uint256 &hashBlock);
+ bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock);
bool GetStats(CCoinsStats &stats);
};
/** Access to the block database (blocks/index/) */
-class CBlockTreeDB : public CLevelDB
+class CBlockTreeDB : public CLevelDBWrapper
{
public:
CBlockTreeDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);