core: rename

This commit is contained in:
Gary Rong 2026-06-24 14:34:47 +08:00 committed by MariusVanDerWijden
parent 271b6c8d03
commit 0c92e31779
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View file

@ -199,8 +199,8 @@ func TestEIP2780InsufficientGasForCallCharge(t *testing.T) {
fresh := common.HexToAddress("0xbeef000000000000000000000000000000000003")
sdb := mkState(senderAlloc(nil))
_, _, err := applyMsg(t, sdb, callTx(0, fresh, 1, 21_000, nil))
if !errors.Is(err, ErrEIP2780CallCharge) {
t.Fatalf("expected ErrEIP2780CallCharge, got %v", err)
if !errors.Is(err, ErrEIP2780CallRecipientCharge) {
t.Fatalf("expected ErrEIP2780CallRecipientCharge, got %v", err)
}
if sdb.Exist(fresh) {
t.Fatal("recipient should not be created when the call charge cannot be paid")

View file

@ -81,9 +81,9 @@ var (
// than required for the data floor cost.
ErrFloorDataGas = errors.New("insufficient gas for floor data gas cost")
// ErrEIP2780CallCharge is returned if the transaction doesn't have sufficient
// gas to cover the cost of EIP-2780 call charge.
ErrEIP2780CallCharge = errors.New("insufficient gas for EIP-2780 call charge")
// ErrEIP2780CallRecipientCharge is returned if the transaction doesn't have
// sufficient gas to cover the cost of 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
// current network configuration.

View file

@ -748,7 +748,7 @@ func (st *stateTransition) execute() (*ExecutionResult, error) {
}
// EIP-2780: charge the transaction's top-level recipient costs.
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.
ret, result, vmerr = st.evm.Call(msg.From, st.to(), msg.Data, st.gasRemaining.ForwardAll(), value)