mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Make leveldb cache configurable * Fix leveldb tests * Add a preallocate option to all caches and disable in tests Co-authored-by: stasatdaglabs <39559713+stasatdaglabs@users.noreply.github.com>
14 lines
321 B
Go
14 lines
321 B
Go
package ldb
|
|
|
|
import "github.com/syndtr/goleveldb/leveldb/opt"
|
|
|
|
// Options is a function that returns a leveldb
|
|
// opt.Options struct for opening a database.
|
|
func Options() opt.Options {
|
|
return opt.Options{
|
|
Compression: opt.NoCompression,
|
|
DisableSeeksCompaction: true,
|
|
NoSync: true,
|
|
}
|
|
}
|