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
2e894b66
Commit
2e894b66
authored
Oct 10, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Max callstack
parent
cb845b9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
block.go
ethchain/block.go
+1
-1
vm.go
ethvm/vm.go
+10
-3
No files found.
ethchain/block.go
View file @
2e894b66
...
...
@@ -348,7 +348,7 @@ func NewUncleBlockFromValue(header *ethutil.Value) *Block {
return
block
}
func
(
block
*
Block
)
Trie
()
*
ethrie
.
Trie
{
func
(
block
*
Block
)
Trie
()
*
eth
t
rie
.
Trie
{
return
block
.
state
.
Trie
}
...
...
ethvm/vm.go
View file @
2e894b66
...
...
@@ -12,6 +12,8 @@ import (
// Shortcut :-)
var
To256
=
ethutil
.
To256
const
MaxCallDepth
=
1024
type
Debugger
interface
{
BreakHook
(
step
int
,
op
OpCode
,
mem
*
Memory
,
stack
*
Stack
,
object
*
ethstate
.
StateObject
)
bool
StepHook
(
step
int
,
op
OpCode
,
mem
*
Memory
,
stack
*
Stack
,
object
*
ethstate
.
StateObject
)
bool
...
...
@@ -37,6 +39,8 @@ type Vm struct {
Fn
string
Recoverable
bool
depth
int
}
type
Environment
interface
{
...
...
@@ -80,6 +84,8 @@ func u256(n int64) *big.Int {
}
func
(
self
*
Vm
)
RunClosure
(
closure
*
Closure
)
(
ret
[]
byte
,
err
error
)
{
self
.
depth
++
if
self
.
Recoverable
{
// Recover from any require exception
defer
func
()
{
...
...
@@ -766,9 +772,6 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
// Generate a new address
addr
:=
ethcrypto
.
CreateAddress
(
closure
.
Address
(),
closure
.
object
.
Nonce
)
//for i := uint64(0); self.env.State().GetStateObject(addr) != nil; i++ {
// ethcrypto.CreateAddress(closure.Address(), closure.object.Nonce+i)
//}
closure
.
object
.
Nonce
++
self
.
Printf
(
" (*) %x"
,
addr
)
.
Endl
()
...
...
@@ -953,6 +956,10 @@ func (self *Execution) Exec(codeAddr []byte, caller ClosureRef) (ret []byte, err
ret
=
p
.
Call
(
self
.
input
)
}
}
else
{
if
self
.
vm
.
depth
==
MaxCallDepth
{
return
nil
,
fmt
.
Errorf
(
"Max call depth exceeded (%d)"
,
MaxCallDepth
)
}
// Retrieve the executing code
code
:=
self
.
vm
.
env
.
State
()
.
GetCode
(
codeAddr
)
...
...
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