utils

package
v0.7.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2014 License: LGPL-2.1-or-later, GPL-2.0 Imports: 26 Imported by: 2,215

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath

func AbsolutePath(Datadir string, filename string) string

func BlockDo

func BlockDo(ethereum *eth.Ethereum, hash []byte) error

Replay block

func DBSanityCheck

func DBSanityCheck(db ethutil.Database) error

func DefaultAssetPath

func DefaultAssetPath() string

func FormatTransactionData

func FormatTransactionData(data string) []byte

func GetMiner

func GetMiner() *miner.Miner

func HandleInterrupt

func HandleInterrupt()

go routine that call interrupt handlers in order of registering

func InitConfig

func InitConfig(vmType int, ConfigFile string, Datadir string, EnvPrefix string) *ethutil.ConfigManager

func InitDataDir

func InitDataDir(Datadir string)

func InitLogging

func InitLogging(Datadir string, LogFile string, LogLevel int, DebugFile string) logger.LogSystem

func KeyTasks

func KeyTasks(keyManager *crypto.KeyManager, KeyRing string, GenAddr bool, SecretFile string, ExportDir string, NonInteractive bool)

func NewClientIdentity

func NewClientIdentity(clientIdentifier, version, customIdentifier string) *wire.SimpleClientIdentity

func NewDatabase

func NewDatabase() ethutil.Database

func NewEthereum

func NewEthereum(db ethutil.Database, clientIdentity wire.ClientIdentity, keyManager *crypto.KeyManager, usePnp bool, OutboundPort string, MaxPeer int) *eth.Ethereum

func NewKeyManager

func NewKeyManager(KeyStore string, Datadir string, db ethutil.Database) *crypto.KeyManager

func RegisterInterrupt

func RegisterInterrupt(cb func(os.Signal))

Register interrupt handlers callbacks

func RunInterruptCallbacks

func RunInterruptCallbacks(sig os.Signal)

func ShowGenesis

func ShowGenesis(ethereum *eth.Ethereum)

func StartEthereum

func StartEthereum(ethereum *eth.Ethereum, UseSeed bool)

func StartMining

func StartMining(ethereum *eth.Ethereum) bool

func StartRpc

func StartRpc(ethereum *eth.Ethereum, RpcPort int)

func StartWebSockets

func StartWebSockets(eth *eth.Ethereum)

func StopMining

func StopMining(ethereum *eth.Ethereum) bool

Types

type VMEnv

type VMEnv struct {
	Gas *big.Int
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(state *state.StateDB, block *types.Block, transactor []byte, value *big.Int) *VMEnv

func (*VMEnv) AddLog

func (self *VMEnv) AddLog(log state.Log)

func (*VMEnv) BlockHash

func (self *VMEnv) BlockHash() []byte

func (*VMEnv) BlockNumber

func (self *VMEnv) BlockNumber() *big.Int

func (*VMEnv) Call

func (self *VMEnv) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error)

func (*VMEnv) CallCode

func (self *VMEnv) CallCode(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error)

func (*VMEnv) Coinbase

func (self *VMEnv) Coinbase() []byte

func (*VMEnv) Create

func (self *VMEnv) Create(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef)

func (*VMEnv) Depth

func (self *VMEnv) Depth() int

func (*VMEnv) Difficulty

func (self *VMEnv) Difficulty() *big.Int

func (*VMEnv) GasLimit

func (self *VMEnv) GasLimit() *big.Int

func (*VMEnv) Origin

func (self *VMEnv) Origin() []byte

func (*VMEnv) PrevHash

func (self *VMEnv) PrevHash() []byte

func (*VMEnv) SetDepth

func (self *VMEnv) SetDepth(i int)

func (*VMEnv) State

func (self *VMEnv) State() *state.StateDB

func (*VMEnv) Time

func (self *VMEnv) Time() int64

func (*VMEnv) Transfer

func (self *VMEnv) Transfer(from, to vm.Account, amount *big.Int) error

func (*VMEnv) Value

func (self *VMEnv) Value() *big.Int

type WebSocketServer

type WebSocketServer struct {
	// contains filtered or unexported fields
}

func NewWebSocketServer

func NewWebSocketServer(eth *eth.Ethereum) *WebSocketServer

func (*WebSocketServer) Serv

func (self *WebSocketServer) Serv()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL