From 4c490db6afeb5a48d3e8d1d65ea8ddc9811d0a6d Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Tue, 30 Jun 2015 09:13:16 +0200 Subject: Use uint64 for block header timestamp --- core/vm/vm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/vm/vm.go') diff --git a/core/vm/vm.go b/core/vm/vm.go index 9e092300d..ba803683b 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -444,7 +444,7 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { case TIMESTAMP: time := self.env.Time() - stack.push(big.NewInt(time)) + stack.push(new(big.Int).SetUint64(time)) case NUMBER: number := self.env.BlockNumber() -- cgit v1.2.3 From 0f04af5916cba5234118a442b6100c8122389abf Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Fri, 3 Jul 2015 19:54:14 +0200 Subject: Fix core error forwarding, unify OOG VM err --- core/vm/vm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/vm/vm.go') diff --git a/core/vm/vm.go b/core/vm/vm.go index ba803683b..e390fb89c 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -116,7 +116,7 @@ func (self *Vm) Run(context *Context, input []byte) (ret []byte, err error) { context.UseGas(context.Gas) - return context.Return(nil), OutOfGasError{} + return context.Return(nil), OutOfGasError } // Resize the memory calculated previously mem.Resize(newMemSize.Uint64()) @@ -789,7 +789,7 @@ func (self *Vm) RunPrecompiled(p *PrecompiledAccount, input []byte, context *Con return context.Return(ret), nil } else { - return nil, OutOfGasError{} + return nil, OutOfGasError } } -- cgit v1.2.3 From ea54283b304a1d308141d21e3ef75b7de0f4519d Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 7 Jul 2015 02:54:22 +0200 Subject: all: update license information --- core/vm/vm.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'core/vm/vm.go') diff --git a/core/vm/vm.go b/core/vm/vm.go index e390fb89c..3fca5f636 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -1,3 +1,19 @@ +// Copyright 2014 The go-ethereum Authors +// This file is part of go-ethereum. +// +// go-ethereum is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// go-ethereum is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with go-ethereum. If not, see . + package vm import ( -- cgit v1.2.3 From bdae4fd573dbc163bab3d0e2d1a5c457892037cd Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 7 Jul 2015 05:08:16 +0200 Subject: all: add some godoc synopsis comments --- core/vm/vm.go | 1 + 1 file changed, 1 insertion(+) (limited to 'core/vm/vm.go') diff --git a/core/vm/vm.go b/core/vm/vm.go index 3fca5f636..9b3fd0009 100644 --- a/core/vm/vm.go +++ b/core/vm/vm.go @@ -14,6 +14,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with go-ethereum. If not, see . +// Package vm implements the Ethereum Virtual Machine. package vm import ( -- cgit v1.2.3