control

package
v1.9.16 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Unlicense Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDatagramSize      = 8192
	UDP4MulticastAddress = "224.0.0.1:11049"
	BufferSize           = 4096
)

Variables

This section is empty.

Functions

func Check

func Check(err error) bool

func Debug

func Debug(a ...interface{})

func Debugc

func Debugc(fn func() string)

func Debugf

func Debugf(format string, a ...interface{})

func Debugs

func Debugs(a interface{})

func Error

func Error(a ...interface{})

func Errorc

func Errorc(fn func() string)

func Errorf

func Errorf(format string, a ...interface{})

func Errors

func Errors(a interface{})

func Fatal

func Fatal(a ...interface{})

func Fatalc

func Fatalc(fn func() string)

func Fatalf

func Fatalf(format string, a ...interface{})

func Fatals

func Fatals(a interface{})

func Info

func Info(a ...interface{})

func Infoc

func Infoc(fn func() string)

func Infof

func Infof(format string, a ...interface{})

func Infos

func Infos(a interface{})

func Trace

func Trace(a ...interface{})

func Tracec

func Tracec(fn func() string)

func Tracef

func Tracef(format string, a ...interface{})

func Traces

func Traces(a interface{})

func Warn

func Warn(a ...interface{})

func Warnc

func Warnc(fn func() string)

func Warnf

func Warnf(format string, a ...interface{})

func Warns

func Warns(a interface{})

Types

type State added in v1.9.16

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

State stores the state of the controller

func New added in v1.9.16

func New(
	cfg *pod.Config,
	stateCfg *state.Config,
	node *chainrpc.Node,
	rpcServer *chainrpc.Server,
	otherNodeCount *atomic.Int32,
	mempoolUpdateChan qu.C,
	killall qu.C,
) (s *State)

New creates a new controller

func (*State) GetMsgBlockTemplate added in v1.9.16

func (s *State) GetMsgBlockTemplate(prev *util.Block, addr util.Address) (mbt *templates.Message, err error)

GetMsgBlockTemplate gets a Message building on given block paying to a given address

func (*State) GetNewAddressFromMiningAddrs added in v1.9.16

func (s *State) GetNewAddressFromMiningAddrs() (addr util.Address, err error)

GetNewAddressFromMiningAddrs tries to get an address from the mining addresses list in the configuration file

func (*State) GetNewAddressFromWallet added in v1.9.16

func (s *State) GetNewAddressFromWallet() (addr util.Address, err error)

GetNewAddressFromWallet gets a new address from the wallet if it is connected, or returns an error

func (*State) Run added in v1.9.16

func (s *State) Run()

Run must be started as a goroutine, central routing for the business of the controller

For increased simplicity, every type of work runs in one thread, only signalling from background goroutines to trigger state changes.

func (*State) Shutdown added in v1.9.16

func (s *State) Shutdown()

Shutdown the controller

func (*State) Start added in v1.9.16

func (s *State) Start()

Start up the controller

func (*State) Stop added in v1.9.16

func (s *State) Stop()

Stop the controller

Directories

Path Synopsis
Package hashrate is a message type for Simplebuffers generated by miners to broadcast an IP address, a count and version number and current height of mining work just completed.
Package hashrate is a message type for Simplebuffers generated by miners to broadcast an IP address, a count and version number and current height of mining work just completed.

Jump to

Keyboard shortcuts

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