aboutsummaryrefslogtreecommitdiff
path: root/src/txdb.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-09-03 09:25:32 +0200
committerPieter Wuille <[email protected]>2014-09-23 22:29:21 +0200
commitc9d1a81ce76737a73c9706e074a4fe8440c8277e (patch)
treee0632f5b7e27ff788ecfef97e0bfd7d31ef12b21 /src/txdb.cpp
parentUse ModifyCoins instead of mutable GetCoins. (diff)
downloaddiscoin-c9d1a81ce76737a73c9706e074a4fe8440c8277e.tar.xz
discoin-c9d1a81ce76737a73c9706e074a4fe8440c8277e.zip
Get rid of CCoinsView's SetCoins and SetBestBlock.
All direct modifications are now done through ModifyCoins, and BatchWrite is used for pushing batches of queued modifications up, so we don't need the low-level SetCoins and SetBestBlock anymore in the top-level CCoinsView class.
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r--src/txdb.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 79838b611..3b353ab62 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -33,12 +33,6 @@ bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) const {
return db.Read(make_pair('c', txid), coins);
}
-bool CCoinsViewDB::SetCoins(const uint256 &txid, const CCoins &coins) {
- CLevelDBBatch batch;
- BatchWriteCoins(batch, txid, coins);
- return db.WriteBatch(batch);
-}
-
bool CCoinsViewDB::HaveCoins(const uint256 &txid) const {
return db.Exists(make_pair('c', txid));
}
@@ -50,12 +44,6 @@ uint256 CCoinsViewDB::GetBestBlock() const {
return hashBestChain;
}
-bool CCoinsViewDB::SetBestBlock(const uint256 &hashBlock) {
- CLevelDBBatch batch;
- BatchWriteHashBestChain(batch, hashBlock);
- return db.WriteBatch(batch);
-}
-
bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
LogPrint("coindb", "Committing %u changed transactions to coin database...\n", (unsigned int)mapCoins.size());