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.
This commit is contained in:
Jeffrey Wilcke
2015-08-31 17:09:50 +02:00
parent 361082ec4b
commit 7c7692933c
35 changed files with 267 additions and 302 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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
}