mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +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"
|
"encoding/binary"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"maps"
|
|
||||||
"math"
|
"math"
|
||||||
"math/big"
|
"math/big"
|
||||||
"math/bits"
|
"math/bits"
|
||||||
|
|
@ -211,7 +210,7 @@ func init() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func activePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
func ActivePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
||||||
switch {
|
switch {
|
||||||
case rules.IsVerkle:
|
case rules.IsVerkle:
|
||||||
return PrecompiledContractsVerkle
|
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.
|
// ActivePrecompiles returns the precompile addresses enabled with the current configuration.
|
||||||
func ActivePrecompiles(rules params.Rules) []common.Address {
|
func ActivePrecompiles(rules params.Rules) []common.Address {
|
||||||
switch {
|
switch {
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,7 @@ func NewEVM(blockCtx BlockContext, statedb StateDB, chainConfig *params.ChainCon
|
||||||
jumpDests: newMapJumpDests(),
|
jumpDests: newMapJumpDests(),
|
||||||
hasher: crypto.NewKeccakState(),
|
hasher: crypto.NewKeccakState(),
|
||||||
}
|
}
|
||||||
evm.precompiles = activePrecompiledContracts(evm.chainRules)
|
evm.precompiles = ActivePrecompiledContracts(evm.chainRules)
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case evm.chainRules.IsOsaka:
|
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.
|
// BlobConfig specifies the target and max blobs per block for the associated fork.
|
||||||
type BlobConfig struct {
|
type BlobConfig struct {
|
||||||
|
UpdateFraction uint64 `json:"baseFeeUpdateFraction"`
|
||||||
Target int `json:"target"`
|
Target int `json:"target"`
|
||||||
Max int `json:"max"`
|
Max int `json:"max"`
|
||||||
UpdateFraction uint64 `json:"baseFeeUpdateFraction"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BlobScheduleConfig determines target and max number of blobs allow per fork.
|
// BlobScheduleConfig determines target and max number of blobs allow per fork.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue