From f54bb270dde527a518003b663f790bb12e6365e7 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Sat, 30 Nov 2024 00:15:48 +0700 Subject: [PATCH] update comment --- core/vm/gas_table.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go index 476ead6203..8ff42b1934 100644 --- a/core/vm/gas_table.go +++ b/core/vm/gas_table.go @@ -26,13 +26,15 @@ import ( "github.com/ethereum/go-ethereum/params" ) +// memoryGasCost calculates the quadratic gas for memory expansion. It does so +// only for the EVM memory region that is expanded, not the total memory. func memoryGasCost(pc uint64, scope *ScopeContext, newMemSize uint64) (uint64, error) { return evmmaxMemoryGasCost(pc, scope, newMemSize, scope.modExtState.AllocSize()) } -// evmmaxMemory calculates the quadratic gas for memory expansion. It does so +// evmmaxMemoryGasCost calculates the quadratic gas for memory expansion. It does so // only for the memory region that is expanded, not the total memory. It uses -// the modified EVMMAX memory expansion rule: consider the size of memory to +// the modified EIP-6690 memory expansion rule: consider the size of memory to // include EVM memory and the memory allocated by all active field contexts. func evmmaxMemoryGasCost(pc uint64, scope *ScopeContext, newMemSize uint64, newEVMMAXMemSize uint64) (uint64, error) { if newMemSize == 0 && newEVMMAXMemSize == 0 {