control

package
v1.9.25 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Unlicense Imports: 33 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var F, E, W, I, D, T logg.LevelPrinter = logg.GetLogPrinterSet(subsystem)

Functions

This section is empty.

Types

type State

type State struct {
	sync.Mutex
	// contains filtered or unexported fields
}

State stores the state of the controller

func New

func New(
	syncing *atomic.Bool,
	cfg *podcfg.Config,
	stateCfg *state.Config,
	node *chainrpc.Node,
	connMgr chainrpc.ServerConnManager,
	mempoolUpdateChan qu.C,
	uuid uint64,
	killall qu.C,
	start, stop qu.C,
) (s *State, e error)

New creates a new controller

func (*State) GetMsgBlockTemplate

func (s *State) GetMsgBlockTemplate(prev *block.Block, addr btcaddr.Address) (mbt *templates.Message, e error)

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

func (*State) GetNewAddressFromMiningAddrs

func (s *State) GetNewAddressFromMiningAddrs() (addr btcaddr.Address, e error)

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

func (*State) GetNewAddressFromWallet

func (s *State) GetNewAddressFromWallet() (addr btcaddr.Address, e error)

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

func (*State) Run

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

func (s *State) Shutdown()

Shutdown the controller

func (*State) Start

func (s *State) Start()

Start up the controller

func (*State) Stop

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