mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
internal/ethapi: fix some issues in eth_config impl
This commit is contained in:
parent
b1eb33ce8b
commit
0a41d7943b
3 changed files with 3 additions and 9 deletions
|
|
@ -21,7 +21,6 @@ import (
|
|||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"math"
|
||||
"math/big"
|
||||
"math/bits"
|
||||
|
|
@ -211,7 +210,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
func activePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
||||
func ActivePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
||||
switch {
|
||||
case rules.IsVerkle:
|
||||
return PrecompiledContractsVerkle
|
||||
|
|
@ -232,11 +231,6 @@ func activePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
|||
}
|
||||
}
|
||||
|
||||
// ActivePrecompiledContracts returns a copy of precompiled contracts enabled with the current configuration.
|
||||
func ActivePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
||||
return maps.Clone(activePrecompiledContracts(rules))
|
||||
}
|
||||
|
||||
// ActivePrecompiles returns the precompile addresses enabled with the current configuration.
|
||||
func ActivePrecompiles(rules params.Rules) []common.Address {
|
||||
switch {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ func NewEVM(blockCtx BlockContext, statedb StateDB, chainConfig *params.ChainCon
|
|||
jumpDests: newMapJumpDests(),
|
||||
hasher: crypto.NewKeccakState(),
|
||||
}
|
||||
evm.precompiles = activePrecompiledContracts(evm.chainRules)
|
||||
evm.precompiles = ActivePrecompiledContracts(evm.chainRules)
|
||||
|
||||
switch {
|
||||
case evm.chainRules.IsOsaka:
|
||||
|
|
|
|||
|
|
@ -598,9 +598,9 @@ func (c *ChainConfig) Description() string {
|
|||
|
||||
// BlobConfig specifies the target and max blobs per block for the associated fork.
|
||||
type BlobConfig struct {
|
||||
UpdateFraction uint64 `json:"baseFeeUpdateFraction"`
|
||||
Target int `json:"target"`
|
||||
Max int `json:"max"`
|
||||
UpdateFraction uint64 `json:"baseFeeUpdateFraction"`
|
||||
}
|
||||
|
||||
// BlobScheduleConfig determines target and max number of blobs allow per fork.
|
||||
|
|
|
|||
Loading…
Reference in a new issue