Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
a95675d5
Unverified
Commit
a95675d5
authored
Dec 06, 2021
by
Martin Holst Swende
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/vm: remove no-recursion option from config
parent
46f701ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
17 deletions
+0
-17
evm.go
core/vm/evm.go
+0
-16
interpreter.go
core/vm/interpreter.go
+0
-1
No files found.
core/vm/evm.go
View file @
a95675d5
...
...
@@ -165,9 +165,6 @@ func (evm *EVM) Interpreter() *EVMInterpreter {
// the necessary steps to create accounts and reverses the state in case of an
// execution error or failed value transfer.
func
(
evm
*
EVM
)
Call
(
caller
ContractRef
,
addr
common
.
Address
,
input
[]
byte
,
gas
uint64
,
value
*
big
.
Int
)
(
ret
[]
byte
,
leftOverGas
uint64
,
err
error
)
{
if
evm
.
Config
.
NoRecursion
&&
evm
.
depth
>
0
{
return
nil
,
gas
,
nil
}
// Fail if we're trying to execute above the call depth limit
if
evm
.
depth
>
int
(
params
.
CallCreateDepth
)
{
return
nil
,
gas
,
ErrDepth
...
...
@@ -254,9 +251,6 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
// CallCode differs from Call in the sense that it executes the given address'
// code with the caller as context.
func
(
evm
*
EVM
)
CallCode
(
caller
ContractRef
,
addr
common
.
Address
,
input
[]
byte
,
gas
uint64
,
value
*
big
.
Int
)
(
ret
[]
byte
,
leftOverGas
uint64
,
err
error
)
{
if
evm
.
Config
.
NoRecursion
&&
evm
.
depth
>
0
{
return
nil
,
gas
,
nil
}
// Fail if we're trying to execute above the call depth limit
if
evm
.
depth
>
int
(
params
.
CallCreateDepth
)
{
return
nil
,
gas
,
ErrDepth
...
...
@@ -305,9 +299,6 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte,
// DelegateCall differs from CallCode in the sense that it executes the given address'
// code with the caller as context and the caller is set to the caller of the caller.
func
(
evm
*
EVM
)
DelegateCall
(
caller
ContractRef
,
addr
common
.
Address
,
input
[]
byte
,
gas
uint64
)
(
ret
[]
byte
,
leftOverGas
uint64
,
err
error
)
{
if
evm
.
Config
.
NoRecursion
&&
evm
.
depth
>
0
{
return
nil
,
gas
,
nil
}
// Fail if we're trying to execute above the call depth limit
if
evm
.
depth
>
int
(
params
.
CallCreateDepth
)
{
return
nil
,
gas
,
ErrDepth
...
...
@@ -347,9 +338,6 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by
// Opcodes that attempt to perform such modifications will result in exceptions
// instead of performing the modifications.
func
(
evm
*
EVM
)
StaticCall
(
caller
ContractRef
,
addr
common
.
Address
,
input
[]
byte
,
gas
uint64
)
(
ret
[]
byte
,
leftOverGas
uint64
,
err
error
)
{
if
evm
.
Config
.
NoRecursion
&&
evm
.
depth
>
0
{
return
nil
,
gas
,
nil
}
// Fail if we're trying to execute above the call depth limit
if
evm
.
depth
>
int
(
params
.
CallCreateDepth
)
{
return
nil
,
gas
,
ErrDepth
...
...
@@ -451,10 +439,6 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
contract
:=
NewContract
(
caller
,
AccountRef
(
address
),
value
,
gas
)
contract
.
SetCodeOptionalHash
(
&
address
,
codeAndHash
)
if
evm
.
Config
.
NoRecursion
&&
evm
.
depth
>
0
{
return
nil
,
address
,
gas
,
nil
}
if
evm
.
Config
.
Debug
{
if
evm
.
depth
==
0
{
evm
.
Config
.
Tracer
.
CaptureStart
(
evm
,
caller
.
Address
(),
address
,
true
,
codeAndHash
.
code
,
gas
,
value
)
...
...
core/vm/interpreter.go
View file @
a95675d5
...
...
@@ -28,7 +28,6 @@ import (
type
Config
struct
{
Debug
bool
// Enables debugging
Tracer
EVMLogger
// Opcode logger
NoRecursion
bool
// Disables call, callcode, delegate call and create
NoBaseFee
bool
// Forces the EIP-1559 baseFee to 0 (needed for 0 price calls)
EnablePreimageRecording
bool
// Enables recording of SHA3/keccak preimages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment