mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-29 07:07: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 {
|
func (opts MdbxOpts) InMem() MdbxOpts {
|
||||||
opts.inMem = true
|
opts.inMem = true
|
||||||
opts.flags = mdbx.UtterlyNoSync | mdbx.NoMetaSync | mdbx.LifoReclaim | mdbx.WriteMap
|
opts.flags = mdbx.UtterlyNoSync | mdbx.NoMetaSync | mdbx.LifoReclaim | mdbx.WriteMap
|
||||||
|
opts.mapSize = 64 * datasize.MB
|
||||||
return opts
|
return opts
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,9 +189,7 @@ func (opts MdbxOpts) Open() (kv.RwDB, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if opts.mapSize == 0 {
|
if opts.mapSize == 0 {
|
||||||
if opts.inMem {
|
if !opts.inMem {
|
||||||
opts.mapSize = 64 * datasize.MB
|
|
||||||
} else {
|
|
||||||
opts.mapSize = 3 * datasize.TB
|
opts.mapSize = 3 * datasize.TB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user