From 7c7692933c21b77328a94eed714f66c276776197 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Mon, 31 Aug 2015 17:09:50 +0200 Subject: cmd/geth, cmd/utils, core, rpc: renamed to blockchain * Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted. --- core/vm/common.go | 4 ++-- core/vm/contract.go | 4 ++-- core/vm/doc.go | 8 ++++---- core/vm/environment.go | 4 ++-- core/vm/memory.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'core/vm') diff --git a/core/vm/common.go b/core/vm/common.go index b52b598ba..2d1aa9332 100644 --- a/core/vm/common.go +++ b/core/vm/common.go @@ -38,7 +38,7 @@ const ( ) var ( - Pow256 = common.BigPow(2, 256) // Pew256 is 2**256 + Pow256 = common.BigPow(2, 256) // Pow256 is 2**256 U256 = common.U256 // Shortcut to common.U256 S256 = common.S256 // Shortcut to common.S256 @@ -46,7 +46,7 @@ var ( Zero = common.Big0 // Shortcut to common.Big0 One = common.Big1 // Shortcut to common.Big1 - max = big.NewInt(math.MaxInt64) // Maximum 256 bit integer + max = big.NewInt(math.MaxInt64) // Maximum 64 bit integer ) // NewVm returns a new VM based on the Environment diff --git a/core/vm/contract.go b/core/vm/contract.go index 8460cc47b..95417e747 100644 --- a/core/vm/contract.go +++ b/core/vm/contract.go @@ -118,8 +118,8 @@ func (self *Contract) SetCode(code []byte) { self.Code = code } -// SetCallCode sets the address of the code address and sets the code -// of the contract according to the backing database. +// SetCallCode sets the code of the contract and address of the backing data +// object func (self *Contract) SetCallCode(addr *common.Address, code []byte) { self.Code = code self.CodeAddr = addr diff --git a/core/vm/doc.go b/core/vm/doc.go index 4deb7761d..ab87bf934 100644 --- a/core/vm/doc.go +++ b/core/vm/doc.go @@ -18,15 +18,15 @@ Package vm implements the Ethereum Virtual Machine. The vm package implements two EVMs, a byte code VM and a JIT VM. The BC -(Byte Code) VM loops over a set of bytes and executes them according to a set -of rules defined in the Ethereum yellow paper. When the BC VM is invokes it +(Byte Code) VM loops over a set of bytes and executes them according to the set +of rules defined in the Ethereum yellow paper. When the BC VM is invoked it invokes the JIT VM in a seperate goroutine and compiles the byte code in JIT instructions. The JIT VM, when invoked, loops around a set of pre-defined instructions until -it either runs of gas, causes an internel error, returns or stops. At a later +it either runs of gas, causes an internal error, returns or stops. At a later stage the JIT VM will see some additional features that will cause sets of instructions to be compiled down to segments. Segments are sets of instructions -that can be ran in one go saving precious time during execution. +that can be run in one go saving precious time during execution. */ package vm diff --git a/core/vm/environment.go b/core/vm/environment.go index 606518fd4..f8e19baea 100644 --- a/core/vm/environment.go +++ b/core/vm/environment.go @@ -26,7 +26,7 @@ import ( // it's own isolated environment. // Environment is an EVM requirement and helper which allows access to outside -// information such like states. +// information such as states. type Environment interface { // The state database Db() Database @@ -50,7 +50,7 @@ type Environment interface { GasLimit() *big.Int // Determines whether it's possible to transact CanTransfer(from common.Address, balance *big.Int) bool - // Transfer from to to with amount set + // Transfers amount from one account to the other Transfer(from, to Account, amount *big.Int) error // Adds a LOG to the state AddLog(*Log) diff --git a/core/vm/memory.go b/core/vm/memory.go index 101ec75cb..d01188417 100644 --- a/core/vm/memory.go +++ b/core/vm/memory.go @@ -18,7 +18,7 @@ package vm import "fmt" -// Memory implements ethereum RAM backed by a simple byte slice +// Memory implements a simple memory model for the ethereum virtual machine. type Memory struct { store []byte } -- cgit v1.2.3