global

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2019 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildTime string

BuildTime build time

View Source
var GitHash string

GitHash git hash

Functions

This section is empty.

Types

type BaseVariable

type BaseVariable interface {
	StateDB() db.MVCCDB
	Config() *common.Config
	BlockChain() block.Chain
	Mode() TMode
	SetMode(m TMode)
	Continuous() int
}

BaseVariable defines BaseVariable's API.

type BaseVariableImpl

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

BaseVariableImpl is the implementation of BaseVariable

func New

func New(conf *common.Config) (*BaseVariableImpl, error)

New return a BaseVariable instance

func (*BaseVariableImpl) BlockChain

func (g *BaseVariableImpl) BlockChain() block.Chain

BlockChain return the block chain

func (*BaseVariableImpl) Config

func (g *BaseVariableImpl) Config() *common.Config

Config return the config

func (*BaseVariableImpl) Continuous added in v1.1.0

func (g *BaseVariableImpl) Continuous() int

Continuous return the number of continue blocks

func (*BaseVariableImpl) Mode

func (g *BaseVariableImpl) Mode() TMode

Mode return the mode

func (*BaseVariableImpl) SetMode

func (g *BaseVariableImpl) SetMode(m TMode)

SetMode is set the mode

func (*BaseVariableImpl) StateDB

func (g *BaseVariableImpl) StateDB() db.MVCCDB

StateDB return the state database

type TMode

type TMode uint

TMode type of mode

const (
	// ModeNormal is normal mode
	ModeNormal TMode = iota
	// ModeSync is sync mode
	ModeSync
	// ModeInit init mode
	ModeInit
)

func (TMode) String

func (m TMode) String() string

String return string of mode

Jump to

Keyboard shortcuts

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