aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-09-26 17:36:53 +0800
committerGitHub <noreply@github.com>2016-09-26 17:36:53 +0800
commit7a5843de318f4bf0e41ddaab2d690fbe6fd04099 (patch)
treeb26a834bc371947cbdf93e6d60eea6476ab3de7a /core/vm
parent6999f1da6b0f8c93b40aa90250e55166018a11a5 (diff)
parent0cc6397195a9cbda719e6955e75be84fcf57ef7a (diff)
downloadgo-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.tar
go-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.tar.gz
go-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.tar.bz2
go-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.tar.lz
go-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.tar.xz
go-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.tar.zst
go-tangerine-7a5843de318f4bf0e41ddaab2d690fbe6fd04099.zip
Merge pull request #3038 from fjl/release/1.4
[release/1.4.13] core/state: track all accounts in canon state
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 e2fc5ee0f..4f0f6a27a 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)
}