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
05d21438
Unverified
Commit
05d21438
authored
Feb 01, 2019
by
Martin Holst Swende
Committed by
GitHub
Feb 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth: make tracers respect pre- EIP 158/161 rule
parent
597597e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
api_tracer.go
eth/api_tracer.go
+8
-4
No files found.
eth/api_tracer.go
View file @
05d21438
...
@@ -214,7 +214,8 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
...
@@ -214,7 +214,8 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
log
.
Warn
(
"Tracing failed"
,
"hash"
,
tx
.
Hash
(),
"block"
,
task
.
block
.
NumberU64
(),
"err"
,
err
)
log
.
Warn
(
"Tracing failed"
,
"hash"
,
tx
.
Hash
(),
"block"
,
task
.
block
.
NumberU64
(),
"err"
,
err
)
break
break
}
}
task
.
statedb
.
Finalise
(
true
)
// Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect
task
.
statedb
.
Finalise
(
api
.
eth
.
blockchain
.
Config
()
.
IsEIP158
(
task
.
block
.
Number
()))
task
.
results
[
i
]
=
&
txTraceResult
{
Result
:
res
}
task
.
results
[
i
]
=
&
txTraceResult
{
Result
:
res
}
}
}
// Stream the result back to the user or abort on teardown
// Stream the result back to the user or abort on teardown
...
@@ -506,7 +507,8 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
...
@@ -506,7 +507,8 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
break
break
}
}
// Finalize the state so any modifications are written to the trie
// Finalize the state so any modifications are written to the trie
statedb
.
Finalise
(
true
)
// Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect
statedb
.
Finalise
(
vmenv
.
ChainConfig
()
.
IsEIP158
(
block
.
Number
()))
}
}
close
(
jobs
)
close
(
jobs
)
pend
.
Wait
()
pend
.
Wait
()
...
@@ -612,7 +614,8 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block
...
@@ -612,7 +614,8 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block
return
dumps
,
err
return
dumps
,
err
}
}
// Finalize the state so any modifications are written to the trie
// Finalize the state so any modifications are written to the trie
statedb
.
Finalise
(
true
)
// Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect
statedb
.
Finalise
(
vmenv
.
ChainConfig
()
.
IsEIP158
(
block
.
Number
()))
// If we've traced the transaction we were looking for, abort
// If we've traced the transaction we were looking for, abort
if
tx
.
Hash
()
==
txHash
{
if
tx
.
Hash
()
==
txHash
{
...
@@ -803,7 +806,8 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
...
@@ -803,7 +806,8 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree
return
nil
,
vm
.
Context
{},
nil
,
fmt
.
Errorf
(
"transaction %#x failed: %v"
,
tx
.
Hash
(),
err
)
return
nil
,
vm
.
Context
{},
nil
,
fmt
.
Errorf
(
"transaction %#x failed: %v"
,
tx
.
Hash
(),
err
)
}
}
// Ensure any modifications are committed to the state
// Ensure any modifications are committed to the state
statedb
.
Finalise
(
true
)
// Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect
statedb
.
Finalise
(
vmenv
.
ChainConfig
()
.
IsEIP158
(
block
.
Number
()))
}
}
return
nil
,
vm
.
Context
{},
nil
,
fmt
.
Errorf
(
"transaction index %d out of range for block %#x"
,
txIndex
,
blockHash
)
return
nil
,
vm
.
Context
{},
nil
,
fmt
.
Errorf
(
"transaction index %d out of range for block %#x"
,
txIndex
,
blockHash
)
}
}
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