mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
txpool: reduce db growth step #583
This commit is contained in:
parent
dfb87cc33b
commit
8e9ea275cd
@ -21,6 +21,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/c2h5oh/datasize"
|
||||||
"github.com/holiman/uint256"
|
"github.com/holiman/uint256"
|
||||||
"github.com/ledgerwatch/erigon-lib/chain"
|
"github.com/ledgerwatch/erigon-lib/chain"
|
||||||
"github.com/ledgerwatch/erigon-lib/direct"
|
"github.com/ledgerwatch/erigon-lib/direct"
|
||||||
@ -101,6 +102,7 @@ func AllComponents(ctx context.Context, cfg txpool.Config, cache kvcache.Cache,
|
|||||||
txPoolDB, err := mdbx.NewMDBX(log.New()).Label(kv.TxPoolDB).Path(cfg.DBDir).
|
txPoolDB, err := mdbx.NewMDBX(log.New()).Label(kv.TxPoolDB).Path(cfg.DBDir).
|
||||||
WithTablessCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.TxpoolTablesCfg }).
|
WithTablessCfg(func(defaultBuckets kv.TableCfg) kv.TableCfg { return kv.TxpoolTablesCfg }).
|
||||||
Flags(func(f uint) uint { return f ^ mdbx2.Durable | mdbx2.SafeNoSync }).
|
Flags(func(f uint) uint { return f ^ mdbx2.Durable | mdbx2.SafeNoSync }).
|
||||||
|
GrowthStep(16 * datasize.MB).
|
||||||
SyncPeriod(30 * time.Second).
|
SyncPeriod(30 * time.Second).
|
||||||
Open()
|
Open()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user