core/vm: added comments

This commit is contained in:
Marius van der Wijden 2024-06-26 11:34:38 +02:00
parent 6c97819d94
commit dff080904b

View file

@ -357,6 +357,7 @@ func opExtCodeSize(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
witness.AddCode(interpreter.evm.StateDB.GetCode(address))
witness.AddCode(interpreter.evm.StateDB.ResolveCode(address))
}
// TODO this should not need to pull up the whole code
code := interpreter.evm.StateDB.GetCode(slot.Bytes20())
if isEOFVersion1(code) {
slot.SetUint64(2)
@ -450,6 +451,7 @@ func opExtCodeHash(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
if interpreter.evm.StateDB.Empty(address) {
slot.Clear()
} else {
// TODO this should not need to pull up the whole code
code := interpreter.evm.StateDB.GetCode(address)
if HasEOFByte(code) {
slot.SetFromHex("0x9dbf3648db8210552e9c4f75c6a1c3057c0ca432043bd648be15fe7be05646f5")