common

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

View Source
const BlankString string = ""
View Source
const FBFTRoundInterval = 500
View Source
const InvalidInt int = 255

Variables

This section is empty.

Functions

func CopyBytes

func CopyBytes(b []byte) (copiedBytes []byte)

func HeaderHash

func HeaderHash(block *types.Block) (hash types.Hash)

func NewTransaction

func NewTransaction(nonce uint64, to types.Address, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, from types.Address) *types.Transaction

func Sum

func Sum(bz []byte) []byte

Sum returns the first 32 bytes of hash of the bz.

func TxHash

func TxHash(tx *types.Transaction) (hash types.Hash)

Types

type MsgType

type MsgType uint8
const (
	MsgNull MsgType = iota
	MsgBlockCommitSuccess
	MsgBlockCommitFailed
	MsgBlockVerifyFailed
	MsgNodeServiceStopped
	MsgRoundRunFailed
	MsgToConsensusFailed
	MsgChangeMaster
)

type SysConfig

type SysConfig struct {
	LogLevel log.Level
	LogPath  string
	LogStyle string
}

Jump to

Keyboard shortcuts

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