mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
save
This commit is contained in:
parent
23c7f503e0
commit
5110fa3a13
@ -121,6 +121,7 @@ func (opts MdbxOpts) Set(opt MdbxOpts) MdbxOpts {
|
||||
func (opts MdbxOpts) InMem() MdbxOpts {
|
||||
opts.inMem = true
|
||||
opts.flags = mdbx.UtterlyNoSync | mdbx.NoMetaSync | mdbx.LifoReclaim | mdbx.WriteMap
|
||||
opts.mapSize = 64 * datasize.MB
|
||||
return opts
|
||||
}
|
||||
|
||||
@ -188,9 +189,7 @@ func (opts MdbxOpts) Open() (kv.RwDB, error) {
|
||||
}
|
||||
|
||||
if opts.mapSize == 0 {
|
||||
if opts.inMem {
|
||||
opts.mapSize = 64 * datasize.MB
|
||||
} else {
|
||||
if !opts.inMem {
|
||||
opts.mapSize = 3 * datasize.TB
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user