From dd41a4a233a1e7aad028d7795f913ab062f71a1b Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Sun, 6 Jul 2014 21:11:44 -0500 Subject: [PATCH] Remove unneeded functions from memdb. This commit removes some functions from memdb which only existed to satify the btcdb.Db interface, but have since been removed from the interface. --- memdb/memdb.go | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/memdb/memdb.go b/memdb/memdb.go index 254ecadb..bd2acb62 100644 --- a/memdb/memdb.go +++ b/memdb/memdb.go @@ -668,42 +668,6 @@ func (db *MemDb) InsertBlock(block *btcutil.Block) (int64, error) { return newHeight, nil } -// InvalidateBlockCache releases all cached blocks. This is part of the -// btcdb.Db interface implementation. -// -// There is no need for a cache with this implementation since the entire -// database is already in memory As a result, this function doesn't do anything -// useful and is only provided to conform to the interface. -func (db *MemDb) InvalidateBlockCache() { - if db.closed { - log.Warnf("InvalidateBlockCache called after db close.") - } -} - -// InvalidateCache releases all cached blocks and transactions. This is part of -// the btcdb.Db interface implementation. -// -// There is no need for a cache with this implementation since the entire -// database is already in memory As a result, this function doesn't do anything -// useful and is only provided to conform to the interface. -func (db *MemDb) InvalidateCache() { - if db.closed { - log.Warnf("InvalidateCache called after db close.") - } -} - -// InvalidateTxCache releases all cached transactions. This is part of the -// btcdb.Db interface implementation. -// -// There is no need for a cache with this implementation since the entire -// database is already in memory As a result, this function doesn't do anything -// useful and is only provided to conform to the interface. -func (db *MemDb) InvalidateTxCache() { - if db.closed { - log.Warnf("InvalidateTxCache called after db close.") - } -} - // NewestSha returns the hash and block height of the most recent (end) block of // the block chain. It will return the zero hash, -1 for the block height, and // no error (nil) if there are not any blocks in the database yet. This is part