mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
core: rename
This commit is contained in:
parent
271b6c8d03
commit
0c92e31779
3 changed files with 6 additions and 6 deletions
|
|
@ -199,8 +199,8 @@ func TestEIP2780InsufficientGasForCallCharge(t *testing.T) {
|
||||||
fresh := common.HexToAddress("0xbeef000000000000000000000000000000000003")
|
fresh := common.HexToAddress("0xbeef000000000000000000000000000000000003")
|
||||||
sdb := mkState(senderAlloc(nil))
|
sdb := mkState(senderAlloc(nil))
|
||||||
_, _, err := applyMsg(t, sdb, callTx(0, fresh, 1, 21_000, nil))
|
_, _, err := applyMsg(t, sdb, callTx(0, fresh, 1, 21_000, nil))
|
||||||
if !errors.Is(err, ErrEIP2780CallCharge) {
|
if !errors.Is(err, ErrEIP2780CallRecipientCharge) {
|
||||||
t.Fatalf("expected ErrEIP2780CallCharge, got %v", err)
|
t.Fatalf("expected ErrEIP2780CallRecipientCharge, got %v", err)
|
||||||
}
|
}
|
||||||
if sdb.Exist(fresh) {
|
if sdb.Exist(fresh) {
|
||||||
t.Fatal("recipient should not be created when the call charge cannot be paid")
|
t.Fatal("recipient should not be created when the call charge cannot be paid")
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,9 @@ var (
|
||||||
// than required for the data floor cost.
|
// than required for the data floor cost.
|
||||||
ErrFloorDataGas = errors.New("insufficient gas for floor data gas cost")
|
ErrFloorDataGas = errors.New("insufficient gas for floor data gas cost")
|
||||||
|
|
||||||
// ErrEIP2780CallCharge is returned if the transaction doesn't have sufficient
|
// ErrEIP2780CallRecipientCharge is returned if the transaction doesn't have
|
||||||
// gas to cover the cost of EIP-2780 call charge.
|
// sufficient gas to cover the cost of EIP-2780 call charge.
|
||||||
ErrEIP2780CallCharge = errors.New("insufficient gas for EIP-2780 call charge")
|
ErrEIP2780CallRecipientCharge = errors.New("insufficient gas for EIP-2780 call recipient charge")
|
||||||
|
|
||||||
// ErrTxTypeNotSupported is returned if a transaction is not supported in the
|
// ErrTxTypeNotSupported is returned if a transaction is not supported in the
|
||||||
// current network configuration.
|
// current network configuration.
|
||||||
|
|
|
||||||
|
|
@ -748,7 +748,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
|
||||||
}
|
}
|
||||||
// EIP-2780: charge the transaction's top-level recipient costs.
|
// EIP-2780: charge the transaction's top-level recipient costs.
|
||||||
if rules.IsAmsterdam && !st.chargeCallRecipientEIP2780(value) {
|
if rules.IsAmsterdam && !st.chargeCallRecipientEIP2780(value) {
|
||||||
return nil, fmt.Errorf("%w: address %v", ErrEIP2780CallCharge, msg.To.Hex())
|
return nil, fmt.Errorf("%w: address %v", ErrEIP2780CallRecipientCharge, msg.To.Hex())
|
||||||
}
|
}
|
||||||
// Execute the transaction's call.
|
// Execute the transaction's call.
|
||||||
ret, result, vmerr = st.evm.Call(msg.From, st.to(), msg.Data, st.gasRemaining.ForwardAll(), value)
|
ret, result, vmerr = st.evm.Call(msg.From, st.to(), msg.Data, st.gasRemaining.ForwardAll(), value)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue