aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-03-17 19:01:40 +0800
committerFelix Lange <fjl@twurst.com>2015-03-17 19:01:40 +0800
commitee7202fa00198abaa423a1483468ca979ac9f3f4 (patch)
tree0f332b84b73997aca73b4d508ab7e8ccf9687bcf /vm/vm.go
parent65eee2006d649b2b4f4fef9332d339444bb479b1 (diff)
parent515d9432fcef8c574627049d437d6898b56c2829 (diff)
downloadgo-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar
go-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.gz
go-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.bz2
go-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.lz
go-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.xz
go-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.tar.zst
go-tangerine-ee7202fa00198abaa423a1483468ca979ac9f3f4.zip
Merge remote-tracking branch 'ethereum/conversion' into conversion
Diffstat (limited to 'vm/vm.go')
-rw-r--r--vm/vm.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/vm/vm.go b/vm/vm.go
index 796a55ad3..706a3e108 100644
--- a/vm/vm.go
+++ b/vm/vm.go
@@ -58,8 +58,10 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
}()
}
- if p := Precompiled[context.CodeAddr.Str()]; p != nil {
- return self.RunPrecompiled(p, callData, context)
+ if context.CodeAddr != nil {
+ if p := Precompiled[context.CodeAddr.Str()]; p != nil {
+ return self.RunPrecompiled(p, callData, context)
+ }
}
var (
@@ -500,7 +502,7 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
n := new(big.Int).Sub(self.env.BlockNumber(), common.Big257)
if num.Cmp(n) > 0 && num.Cmp(self.env.BlockNumber()) < 0 {
- stack.push(common.BigD(self.env.GetHash(num.Uint64())))
+ stack.push(self.env.GetHash(num.Uint64()).Big())
} else {
stack.push(common.Big0)
}
@@ -509,7 +511,7 @@ func (self *Vm) Run(context *Context, callData []byte) (ret []byte, err error) {
case COINBASE:
coinbase := self.env.Coinbase()
- stack.push(common.BigD(coinbase))
+ stack.push(coinbase.Big())
self.Printf(" => 0x%x", coinbase)
case TIMESTAMP: