common

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: GPL-3.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContractAddress

func GetContractAddress(name string, runMode configs.RunMode) common.Address

GetContractAddress get contract address by name

func NewCpcClient

func NewCpcClient(ep string, kspath string, password string) (*cpclient.Client, *ecdsa.PrivateKey, *ecdsa.PublicKey, common.Address, error)

NewCpcClient new a cpc.client

Types

type Manager

type Manager interface {
	GetStatus() (*Status, error)
	StartMining() error
	StopMining() error
	QuitRnode() error
	JoinRnode() error
}

Manager manage the cpchain node

type Output

type Output interface {
	Status(status *Status)
	Info(msg string, params ...interface{})
	Error(msg string, params ...interface{})
	Fatal(msg string, params ...interface{})
	Warn(msg string, params ...interface{})
}

Output data

type Status

type Status struct {
	Mining   bool
	RNode    bool
	Proposer bool
	Locked   bool
}

Status is the status of cpchain node

Jump to

Keyboard shortcuts

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