test

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAcc

func CreateAcc(accName, accKey, creatorKey string, css iservices.IConsensus) error

func DisableBP

func DisableBP(name, sk string, css iservices.IConsensus) error

func EnableBP

func EnableBP(name, sk string, css iservices.IConsensus) error

func RegisterBP

func RegisterBP(name, sk string, css iservices.IConsensus) error

Types

type CommitInfo

type CommitInfo struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewCommitInfo

func NewCommitInfo() *CommitInfo

func (*CommitInfo) Commit

func (ci *CommitInfo) Commit(b common.ISignedBlock)

func (*CommitInfo) ConfirmationTimeInfo

func (ci *CommitInfo) ConfirmationTimeInfo() []float64

func (*CommitInfo) MarginStepInfo

func (ci *CommitInfo) MarginStepInfo() []float64

type Components

type Components struct {
	ConsensusSvc iservices.IConsensus
	P2pSvc       iservices.IP2P
	State        NodeState
}

type Monitor

type Monitor struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(c []*Components) *Monitor

func (*Monitor) Run

func (m *Monitor) Run(stopCh chan struct{})

func (*Monitor) Shuffle

func (m *Monitor) Shuffle(names, sks []string, css iservices.IConsensus, stopCh chan struct{})

type NodeState

type NodeState int
const (
	OffLine NodeState = 0
	Syncing NodeState = 1
	OnLine  NodeState = 2
)

Jump to

Keyboard shortcuts

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