From 2feff1ea168b481189cdc91a6a63ab9196416c8e Mon Sep 17 00:00:00 2001 From: "Paul W. Homer" Date: Sat, 1 Apr 2017 15:44:41 -0400 Subject: [PATCH] Commented the empty table in c_level_db, and cleaned up the mem_db Value call. --- c_level_db.go | 1 + mem_db.go | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/c_level_db.go b/c_level_db.go index 41ed4dc16..33a780094 100644 --- a/c_level_db.go +++ b/c_level_db.go @@ -107,6 +107,7 @@ func (db *CLevelDB) Print() { } func (db *CLevelDB) Stats() map[string]string { + // TODO: Find the available properties for the C LevelDB implementation keys := []string{} stats := make(map[string]string) diff --git a/mem_db.go b/mem_db.go index c80060526..286624294 100644 --- a/mem_db.go +++ b/mem_db.go @@ -94,10 +94,7 @@ func (it *memDBIterator) Key() []byte { } func (it *memDBIterator) Value() []byte { - it.db.mtx.Lock() - defer it.db.mtx.Unlock() - - return it.db.db[it.keys[it.last]] + return it.db.Get(it.Key()) } func (db *MemDB) Iterator() Iterator {