core: fix typos (#28255)

fixes various typos in core
pull/28305/head
0xbstn 1 year ago committed by GitHub
parent 08326794e8
commit fa6107c85e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      core/vm/contract.go
  2. 2
      core/vm/gas_table.go
  3. 2
      core/vm/interpreter.go
  4. 4
      core/vm/jump_table_export.go

@ -31,13 +31,13 @@ type ContractRef interface {
// AccountRef implements ContractRef. // AccountRef implements ContractRef.
// //
// Account references are used during EVM initialisation and // Account references are used during EVM initialisation and
// it's primary use is to fetch addresses. Removing this object // its primary use is to fetch addresses. Removing this object
// proves difficult because of the cached jump destinations which // proves difficult because of the cached jump destinations which
// are fetched from the parent contract (i.e. the caller), which // are fetched from the parent contract (i.e. the caller), which
// is a ContractRef. // is a ContractRef.
type AccountRef common.Address type AccountRef common.Address
// Address casts AccountRef to a Address // Address casts AccountRef to an Address
func (ar AccountRef) Address() common.Address { return (common.Address)(ar) } func (ar AccountRef) Address() common.Address { return (common.Address)(ar) }
// Contract represents an ethereum contract in the state database. It contains // Contract represents an ethereum contract in the state database. It contains

@ -104,7 +104,7 @@ func gasSStore(evm *EVM, contract *Contract, stack *Stack, mem *Memory, memorySi
// Legacy rules should be applied if we are in Petersburg (removal of EIP-1283) // Legacy rules should be applied if we are in Petersburg (removal of EIP-1283)
// OR Constantinople is not active // OR Constantinople is not active
if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople { if evm.chainRules.IsPetersburg || !evm.chainRules.IsConstantinople {
// This checks for 3 scenario's and calculates gas accordingly: // This checks for 3 scenarios and calculates gas accordingly:
// //
// 1. From a zero-value address to a non-zero value (NEW VALUE) // 1. From a zero-value address to a non-zero value (NEW VALUE)
// 2. From a non-zero value address to a zero-value address (DELETE) // 2. From a non-zero value address to a zero-value address (DELETE)

@ -45,7 +45,7 @@ type EVMInterpreter struct {
table *JumpTable table *JumpTable
hasher crypto.KeccakState // Keccak256 hasher instance shared across opcodes hasher crypto.KeccakState // Keccak256 hasher instance shared across opcodes
hasherBuf common.Hash // Keccak256 hasher result array shared aross opcodes hasherBuf common.Hash // Keccak256 hasher result array shared across opcodes
readOnly bool // Whether to throw on stateful modifications readOnly bool // Whether to throw on stateful modifications
returnData []byte // Last CALL's return data for subsequent reuse returnData []byte // Last CALL's return data for subsequent reuse

@ -22,7 +22,7 @@ import (
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
) )
// LookupInstructionSet returns the instructionset for the fork configured by // LookupInstructionSet returns the instruction set for the fork configured by
// the rules. // the rules.
func LookupInstructionSet(rules params.Rules) (JumpTable, error) { func LookupInstructionSet(rules params.Rules) (JumpTable, error) {
switch { switch {
@ -56,7 +56,7 @@ func LookupInstructionSet(rules params.Rules) (JumpTable, error) {
return newFrontierInstructionSet(), nil return newFrontierInstructionSet(), nil
} }
// Stack returns the mininum and maximum stack requirements. // Stack returns the minimum and maximum stack requirements.
func (op *operation) Stack() (int, int) { func (op *operation) Stack() (int, int) {
return op.minStack, op.maxStack return op.minStack, op.maxStack
} }

Loading…
Cancel
Save