Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

fix(config): Move on-disk txpool elements to data folder #1287

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cosmos/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,15 @@ func readConfigFromAppOptsParser(parser AppOptionsParser) (*Config, error) {
return nil, err
}

if conf.Polar.LegacyTxPool.Journal == "" {
conf.Polar.LegacyTxPool.Journal, err =
parser.GetString(sdkflags.FlagHome)
if err != nil {
return nil, err
}
conf.Polar.LegacyTxPool.Journal += "/data/transactions.rlp"
}

if conf.Polar.LegacyTxPool.Rejournal, err =
parser.GetTimeDuration(flags.ReJournal); err != nil {
return nil, err
Expand Down
6 changes: 4 additions & 2 deletions eth/polar/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ func DefaultConfig() *Config {
gpoConfig.Default = big.NewInt(gpoDefault)
minerCfg := miner.DefaultConfig
minerCfg.Etherbase = common.HexToAddress(developmentCoinbase)
// TODO: setup proper command line flags
legacyPool := legacypool.DefaultConfig
legacyPool.Journal = ""

return &Config{
Chain: *params.DefaultChainConfig,
Miner: minerCfg,
GPO: gpoConfig,
LegacyTxPool: legacypool.DefaultConfig,
LegacyTxPool: legacyPool,
RPCGasCap: ethconfig.Defaults.RPCGasCap,
RPCTxFeeCap: ethconfig.Defaults.RPCTxFeeCap,
RPCEVMTimeout: ethconfig.Defaults.RPCEVMTimeout,
Expand Down
Loading