Skip to content

Commit 23721c1

Browse files
committed
insert bytecode into witness for EXTCODEHASH opcode
1 parent 88dcc09 commit 23721c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/state/statedb.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ func (s *StateDB) GetKeccakCodeHash(addr common.Address) common.Hash {
338338
if stateObject == nil {
339339
return common.Hash{}
340340
}
341+
if s.witness != nil {
342+
s.witness.AddCode(stateObject.Code(s.db))
343+
}
341344
return common.BytesToHash(stateObject.KeccakCodeHash())
342345
}
343346

0 commit comments

Comments
 (0)