Removed old code

This commit is contained in:
obscuren 2014-08-23 11:00:33 +02:00
parent d9d4f63cd4
commit 962255b373
2 changed files with 4 additions and 11 deletions

View File

@ -176,7 +176,7 @@ func (bc *BlockChain) setLastBlock() {
} }
func (bc *BlockChain) SetTotalDifficulty(td *big.Int) { func (bc *BlockChain) SetTotalDifficulty(td *big.Int) {
ethutil.Config.Db.Put([]byte("LastKnownTotalDifficulty"), td.Bytes()) ethutil.Config.Db.Put([]byte("LTD"), td.Bytes())
bc.TD = td bc.TD = td
} }

View File

@ -2,9 +2,10 @@ package ethdb
import ( import (
"fmt" "fmt"
"path"
"github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethutil"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"path"
) )
type LDBDatabase struct { type LDBDatabase struct {
@ -45,7 +46,7 @@ func (db *LDBDatabase) Db() *leveldb.DB {
} }
func (db *LDBDatabase) LastKnownTD() []byte { func (db *LDBDatabase) LastKnownTD() []byte {
data, _ := db.db.Get([]byte("LastKnownTotalDifficulty"), nil) data, _ := db.db.Get([]byte("LTD"), nil)
if len(data) == 0 { if len(data) == 0 {
data = []byte{0x0} data = []byte{0x0}
@ -54,14 +55,6 @@ func (db *LDBDatabase) LastKnownTD() []byte {
return data return data
} }
/*
func (db *LDBDatabase) GetKeys() []*ethutil.Key {
data, _ := db.Get([]byte("KeyRing"))
return []*ethutil.Key{ethutil.NewKeyFromBytes(data)}
}
*/
func (db *LDBDatabase) Close() { func (db *LDBDatabase) Close() {
// Close the leveldb database // Close the leveldb database
db.db.Close() db.db.Close()