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

Commit

Permalink
Merge branch 'main' into calbera/beng-372-upgrade-polaris-geth-to-lat…
Browse files Browse the repository at this point in the history
…est-geth
  • Loading branch information
itsdevbear authored May 31, 2023
2 parents 0d7dc19 + 58582f9 commit c96e12f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cosmos/x/evm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ func (k *Keeper) Setup(

// Build the Polaris EVM Provider
cfg, err := polar.LoadConfigFromFilePath(polarisConfigPath)
if err != nil {
logger.Error("failed to load config", "falling back to defaults")
// TODO: fix properly
if err != nil || cfg.GPO == nil {
logger.Error("failed to load polaris config", "falling back to defaults")
cfg = polar.DefaultConfig()
}

Expand Down
2 changes: 1 addition & 1 deletion eth/polar/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func NewBackend(
cfg: cfg,
logger: log.Root(),
}
b.gpo = gasprice.NewOracle(b, cfg.GPO)
b.gpo = gasprice.NewOracle(b, *cfg.GPO)
return b
}

Expand Down
4 changes: 2 additions & 2 deletions eth/polar/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func DefaultConfig() *Config {
gpoConfig := ethconfig.FullNodeGPO
gpoConfig.Default = big.NewInt(gpoDefault)
return &Config{
GPO: gpoConfig,
GPO: &gpoConfig,
RPCGasCap: ethconfig.Defaults.RPCGasCap,
RPCTxFeeCap: ethconfig.Defaults.RPCTxFeeCap,
RPCEVMTimeout: ethconfig.Defaults.RPCEVMTimeout,
Expand All @@ -55,7 +55,7 @@ func DefaultConfig() *Config {
// Config represents the configurable parameters for Polaris.
type Config struct {
// Gas Price Oracle config.
GPO gasprice.Config
GPO *gasprice.Config

// RPCGasCap is the global gas cap for eth-call variants.
RPCGasCap uint64 `toml:""`
Expand Down

0 comments on commit c96e12f

Please sign in to comment.