aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorJames O'Beirne <james.obeirne@gmail.com>2015-10-09 10:55:27 -0700
committerJames O'Beirne <james.obeirne@gmail.com>2015-10-09 10:56:48 -0700
commitdcd8e27c65de0d2cb972588a6e811ca7ccd1b3bd (patch)
treed53c4b73ad23c520732eb2f79e1a8d9652d5d272 /src/txdb.cpp
parent14885068726a8e0dc73ffa127225ab80be3e3612 (diff)
Refer to obfuscate_key via pointer in peripheral CLevelDB classes
cc @sipa
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 4d7ec27aae..5723c92440 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -49,7 +49,7 @@ uint256 CCoinsViewDB::GetBestBlock() const {
}
bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
- CLevelDBBatch batch(db.GetObfuscateKey());
+ CLevelDBBatch batch(&db.GetObfuscateKey());
size_t count = 0;
size_t changed = 0;
for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) {
@@ -141,7 +141,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
}
bool CBlockTreeDB::WriteBatchSync(const std::vector<std::pair<int, const CBlockFileInfo*> >& fileInfo, int nLastFile, const std::vector<const CBlockIndex*>& blockinfo) {
- CLevelDBBatch batch(GetObfuscateKey());
+ CLevelDBBatch batch(&GetObfuscateKey());
for (std::vector<std::pair<int, const CBlockFileInfo*> >::const_iterator it=fileInfo.begin(); it != fileInfo.end(); it++) {
batch.Write(make_pair(DB_BLOCK_FILES, it->first), *it->second);
}
@@ -157,7 +157,7 @@ bool CBlockTreeDB::ReadTxIndex(const uint256 &txid, CDiskTxPos &pos) {
}
bool CBlockTreeDB::WriteTxIndex(const std::vector<std::pair<uint256, CDiskTxPos> >&vect) {
- CLevelDBBatch batch(GetObfuscateKey());
+ CLevelDBBatch batch(&GetObfuscateKey());
for (std::vector<std::pair<uint256,CDiskTxPos> >::const_iterator it=vect.begin(); it!=vect.end(); it++)
batch.Write(make_pair(DB_TXINDEX, it->first), it->second);
return WriteBatch(batch);