mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
ethdb: updates to pr
This commit is contained in:
parent
5b82077167
commit
a8155f3d25
1 changed files with 3 additions and 2 deletions
|
|
@ -154,7 +154,7 @@ func (db *LDBDatabase) Close() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// LDB returns the memory address for leveldb.DB.
|
// LDB returns the internal leveldb.DB instance.
|
||||||
func (db *LDBDatabase) LDB() *leveldb.DB {
|
func (db *LDBDatabase) LDB() *leveldb.DB {
|
||||||
return db.db
|
return db.db
|
||||||
}
|
}
|
||||||
|
|
@ -361,7 +361,8 @@ func (db *LDBDatabase) meter(refresh time.Duration) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewBatch populates the ldbBatch for read and writes to the db.
|
// NewBatch creates a memory buffer to group together database writes and flush
|
||||||
|
// them out in one go. Batches are not atomic, just an performance optimization.
|
||||||
func (db *LDBDatabase) NewBatch() Batch {
|
func (db *LDBDatabase) NewBatch() Batch {
|
||||||
return &ldbBatch{db: db.db, b: new(leveldb.Batch)}
|
return &ldbBatch{db: db.db, b: new(leveldb.Batch)}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue