mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 09:53:48 +00:00
update comment
This commit is contained in:
parent
e4aa362e75
commit
f54bb270dd
1 changed files with 4 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue