From b8f9b3779fbdc62d5a935b57f1360608fa4600b4 Mon Sep 17 00:00:00 2001
From: Nalin Bhardwaj <nalinbhardwaj@nibnalin.me>
Date: Thu, 24 Jan 2019 16:44:02 +0530
Subject: [PATCH] core/vm: fix typos and use ExpGas for EXP (#18400)

This replaces the GasSlowStep constant with params.ExpGas.
Both constants have value 10.
---
 core/vm/gas_table.go      | 4 ++--
 params/protocol_params.go | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/vm/gas_table.go b/core/vm/gas_table.go
index 9203e10a7..f22463c33 100644
--- a/core/vm/gas_table.go
+++ b/core/vm/gas_table.go
@@ -22,7 +22,7 @@ import (
 	"github.com/ethereum/go-ethereum/params"
 )
 
-// memoryGasCosts calculates the quadratic gas for memory expansion. It does so
+// memoryGasCost calculates the quadratic gas for memory expansion. It does so
 // only for the memory region that is expanded, not the total memory.
 func memoryGasCost(mem *Memory, newMemSize uint64) (uint64, error) {
 
@@ -382,7 +382,7 @@ func gasExp(gt params.GasTable, evm *EVM, contract *Contract, stack *Stack, mem
 		gas      = expByteLen * gt.ExpByte // no overflow check required. Max is 256 * ExpByte gas
 		overflow bool
 	)
-	if gas, overflow = math.SafeAdd(gas, GasSlowStep); overflow {
+	if gas, overflow = math.SafeAdd(gas, params.ExpGas); overflow {
 		return 0, errGasUintOverflow
 	}
 	return gas, nil
diff --git a/params/protocol_params.go b/params/protocol_params.go
index c8b6609af..14750f6a1 100644
--- a/params/protocol_params.go
+++ b/params/protocol_params.go
@@ -52,7 +52,7 @@ const (
 	NetSstoreResetRefund      uint64 = 4800  // Once per SSTORE operation for resetting to the original non-zero value
 	NetSstoreResetClearRefund uint64 = 19800 // Once per SSTORE operation for resetting to the original zero value
 
-	JumpdestGas      uint64 = 1     // Refunded gas, once per SSTORE operation if the zeroness changes to zero.
+	JumpdestGas      uint64 = 1     // Once per JUMPDEST operation.
 	EpochDuration    uint64 = 30000 // Duration between proof-of-work epochs.
 	CallGas          uint64 = 40    // Once per CALL operation & message call transaction.
 	CreateDataGas    uint64 = 200   //
-- 
GitLab