mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
allow configure pagesize
This commit is contained in:
parent
8791c5eb7a
commit
ec2a482087
@ -81,9 +81,10 @@ type DBVerbosityLvl int8
|
|||||||
type Label uint8
|
type Label uint8
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ChainDB Label = 0
|
ChainDB Label = 0
|
||||||
TxPoolDB Label = 1
|
TxPoolDB Label = 1
|
||||||
SentryDB Label = 2
|
SentryDB Label = 2
|
||||||
|
ConsensusDB Label = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
func (l Label) String() string {
|
func (l Label) String() string {
|
||||||
|
@ -169,6 +169,10 @@ func (opts MdbxOpts) Open() (kv.RwDB, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if opts.label == kv.ChainDB && opts.pageSize == 4096 {
|
||||||
|
panic(1)
|
||||||
|
}
|
||||||
|
fmt.Printf("al: %s, %d\n", opts.label, opts.pageSize)
|
||||||
if err = env.SetGeometry(-1, -1, int(opts.mapSize), int(2*datasize.GB), -1, int(opts.pageSize)); err != nil {
|
if err = env.SetGeometry(-1, -1, int(opts.mapSize), int(2*datasize.GB), -1, int(opts.pageSize)); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user