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
d0675e9d
Unverified
Commit
d0675e9d
authored
Nov 08, 2018
by
Péter Szilágyi
Committed by
GitHub
Nov 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17982 from holiman/polish_contantinople_extcodehash
core/vm: check empty in extcodehash
parents
bd519ab8
1b6fd032
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
instructions.go
core/vm/instructions.go
+6
-1
No files found.
core/vm/instructions.go
View file @
d0675e9d
...
...
@@ -544,7 +544,12 @@ func opExtCodeCopy(pc *uint64, interpreter *EVMInterpreter, contract *Contract,
// this account should be regarded as a non-existent account and zero should be returned.
func
opExtCodeHash
(
pc
*
uint64
,
interpreter
*
EVMInterpreter
,
contract
*
Contract
,
memory
*
Memory
,
stack
*
Stack
)
([]
byte
,
error
)
{
slot
:=
stack
.
peek
()
slot
.
SetBytes
(
interpreter
.
evm
.
StateDB
.
GetCodeHash
(
common
.
BigToAddress
(
slot
))
.
Bytes
())
address
:=
common
.
BigToAddress
(
slot
)
if
interpreter
.
evm
.
StateDB
.
Empty
(
address
)
{
slot
.
SetUint64
(
0
)
}
else
{
slot
.
SetBytes
(
interpreter
.
evm
.
StateDB
.
GetCodeHash
(
address
)
.
Bytes
())
}
return
nil
,
nil
}
...
...
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