aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/environment.go1
-rw-r--r--core/vm/instructions.go2
2 files changed, 2 insertions, 1 deletions
diff --git a/core/vm/environment.go b/core/vm/environment.go
index 747627565..4bd03de7e 100644
--- a/core/vm/environment.go
+++ b/core/vm/environment.go
@@ -94,6 +94,7 @@ type Database interface {
GetNonce(common.Address) uint64
SetNonce(common.Address, uint64)
+ GetCodeSize(common.Address) int
GetCode(common.Address) []byte
SetCode(common.Address, []byte)
diff --git a/core/vm/instructions.go b/core/vm/instructions.go
index a95ba26c5..849a8463c 100644
--- a/core/vm/instructions.go
+++ b/core/vm/instructions.go
@@ -363,7 +363,7 @@ func opCalldataCopy(instr instruction, pc *uint64, env Environment, contract *Co
func opExtCodeSize(instr instruction, pc *uint64, env Environment, contract *Contract, memory *Memory, stack *Stack) {
addr := common.BigToAddress(stack.pop())
- l := big.NewInt(int64(len(env.Db().GetCode(addr))))
+ l := big.NewInt(int64(env.Db().GetCodeSize(addr)))
stack.push(l)
}