mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
core/types: fix parameter access
This commit is contained in:
parent
8da6d3759b
commit
57c395f59a
1 changed files with 2 additions and 3 deletions
|
|
@ -41,7 +41,7 @@ type sigCache struct {
|
||||||
// MakeSigner returns a Signer based on the given chain config and block number.
|
// MakeSigner returns a Signer based on the given chain config and block number.
|
||||||
func MakeSigner(config *params.Config2, blockNumber *big.Int, blockTime uint64) Signer {
|
func MakeSigner(config *params.Config2, blockNumber *big.Int, blockTime uint64) Signer {
|
||||||
number := blockNumber.Uint64()
|
number := blockNumber.Uint64()
|
||||||
chainID := params.Get[*params.ChainID](config).BigInt()
|
chainID := params.ChainID.Get(config)
|
||||||
|
|
||||||
var signer Signer
|
var signer Signer
|
||||||
switch {
|
switch {
|
||||||
|
|
@ -71,7 +71,7 @@ func MakeSigner(config *params.Config2, blockNumber *big.Int, blockTime uint64)
|
||||||
// Use this in transaction-handling code where the current block number is unknown. If you
|
// Use this in transaction-handling code where the current block number is unknown. If you
|
||||||
// have the current block number available, use MakeSigner instead.
|
// have the current block number available, use MakeSigner instead.
|
||||||
func LatestSigner(config *params.Config2) Signer {
|
func LatestSigner(config *params.Config2) Signer {
|
||||||
chainID := params.Get[*params.ChainID](config).BigInt()
|
chainID := params.ChainID.Get(config)
|
||||||
|
|
||||||
var signer Signer
|
var signer Signer
|
||||||
if chainID != nil {
|
if chainID != nil {
|
||||||
|
|
@ -212,7 +212,6 @@ func newModernSigner(chainID *big.Int, fork forks.Fork) Signer {
|
||||||
}
|
}
|
||||||
s.txtypes[LegacyTxType] = struct{}{}
|
s.txtypes[LegacyTxType] = struct{}{}
|
||||||
// configure tx types
|
// configure tx types
|
||||||
// TODO: fix this
|
|
||||||
if fork.After(forks.Berlin) {
|
if fork.After(forks.Berlin) {
|
||||||
s.txtypes[AccessListTxType] = struct{}{}
|
s.txtypes[AccessListTxType] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue