aboutsummaryrefslogtreecommitdiffstats
path: root/ethdb
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-12-19 03:26:19 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-12-19 03:26:19 +0800
commitdbbcf558e2c4ccb4556ba62d07204c25ddcb4783 (patch)
treec80eb767d4e4d38486688997318906e5396e5c93 /ethdb
parent4811409e99e87cd8862a9813422d61fc0f752d18 (diff)
parente6fb69296e647ff305e5d9df059e5aa956303538 (diff)
downloadgo-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.tar
go-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.tar.gz
go-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.tar.bz2
go-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.tar.lz
go-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.tar.xz
go-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.tar.zst
go-tangerine-dbbcf558e2c4ccb4556ba62d07204c25ddcb4783.zip
Merge pull request #2064 from fjl/remove-common-rlp
common: remove old RLP implementation, Value and ExtPackage
Diffstat (limited to 'ethdb')
-rw-r--r--ethdb/memory_database.go23
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}