control

package
v1.9.20 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 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

This section is empty.

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,
	uuid uint64,
	killall qu.C,
) (s *State)

New creates a new controller

func (*State) Advertise added in v1.9.18

func (s *State) Advertise()

func (*State) GetMsgBlockTemplate added in v1.9.16

func (s *State) GetMsgBlockTemplate(prev *util.Block, addr util.Address) (mbt *templates.Message, e 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, e 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, e 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