mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
update to newest spec
This commit is contained in:
parent
7d15fa0075
commit
4abb17b9af
2 changed files with 3 additions and 10 deletions
|
|
@ -863,9 +863,9 @@ func (st *stateTransition) chargeCallRecipientEIP2780(value *uint256.Int) bool {
|
||||||
to = *st.msg.To
|
to = *st.msg.To
|
||||||
)
|
)
|
||||||
// EIP-8037: a value transfer to an empty recipient charges NEW_ACCOUNT
|
// EIP-8037: a value transfer to an empty recipient charges NEW_ACCOUNT
|
||||||
// state gas — except for precompiles, which are protocol-inherent and not
|
// state gas. As of EIP-2780 spec update #3048 this also applies to
|
||||||
// "created" by the transfer, so the charge is suppressed for them.
|
// precompiles (a value transfer to a zero-balance precompile is charged).
|
||||||
if !value.IsZero() && st.state.Empty(to) && !st.evm.IsPrecompile(to) {
|
if !value.IsZero() && st.state.Empty(to) {
|
||||||
cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte
|
cost.StateGas += params.AccountCreationSize * st.evm.Context.CostPerStateByte
|
||||||
}
|
}
|
||||||
if _, ok := types.ParseDelegation(st.state.GetCode(to)); ok {
|
if _, ok := types.ParseDelegation(st.state.GetCode(to)); ok {
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,6 @@ func (evm *EVM) precompile(addr common.Address) (PrecompiledContract, bool) {
|
||||||
return p, ok
|
return p, ok
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPrecompile reports whether addr is an active precompile for the current
|
|
||||||
// fork ruleset.
|
|
||||||
func (evm *EVM) IsPrecompile(addr common.Address) bool {
|
|
||||||
_, ok := evm.precompiles[addr]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
// BlockContext provides the EVM with auxiliary information. Once provided
|
// BlockContext provides the EVM with auxiliary information. Once provided
|
||||||
// it shouldn't be modified.
|
// it shouldn't be modified.
|
||||||
type BlockContext struct {
|
type BlockContext struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue