From c9d1a81ce76737a73c9706e074a4fe8440c8277e Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 3 Sep 2014 09:25:32 +0200 Subject: 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. --- src/txdb.cpp | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/txdb.cpp') diff --git a/src/txdb.cpp b/src/txdb.cpp index 79838b6116..3b353ab624 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()); -- cgit v1.2.3