diff options
Diffstat (limited to 'ethdb/memory_database.go')
-rw-r--r-- | ethdb/memory_database.go | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/ethdb/memory_database.go b/ethdb/memory_database.go index 01273b9db..45423ed73 100644 --- a/ethdb/memory_database.go +++ b/ethdb/memory_database.go @@ -18,7 +18,6 @@ package ethdb import ( "errors" - "fmt" "sync" "github.com/ethereum/go-ethereum/common" @@ -90,27 +89,7 @@ func (db *MemDatabase) Delete(key []byte) error { return nil } -func (db *MemDatabase) Print() { - db.lock.RLock() - defer db.lock.RUnlock() - - for key, val := range db.db { - fmt.Printf("%x(%d): ", key, len(key)) - node := common.NewValueFromBytes(val) - fmt.Printf("%q\n", node.Val) - } -} - -func (db *MemDatabase) Close() { -} - -func (db *MemDatabase) LastKnownTD() []byte { - data, _ := db.Get([]byte("LastKnownTotalDifficulty")) - if len(data) == 0 || data == nil { - data = []byte{0x0} - } - return data -} +func (db *MemDatabase) Close() {} func (db *MemDatabase) NewBatch() Batch { return &memBatch{db: db} |