mirror of https://github.com/status-im/op-geth.git
leveldb API changed for NewIterator. Fixes #20
This commit is contained in:
parent
e98b53bbef
commit
c9f3d1c00b
|
@ -54,13 +54,19 @@ 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()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *LDBDatabase) Print() {
|
func (db *LDBDatabase) Print() {
|
||||||
iter := db.db.NewIterator(nil)
|
iter := db.db.NewIterator(nil, nil)
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
key := iter.Key()
|
key := iter.Key()
|
||||||
value := iter.Value()
|
value := iter.Value()
|
||||||
|
|
Loading…
Reference in New Issue