Documentation ¶
Overview ¶
Package updater implements the Fonero updater.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func Head ¶
func Head(net wire.CurrencyNet) (*[32]byte, error)
Head returns the current hashchain head for the given net.
func SplitMsgInv ¶
SplitMsgInv splits an inventory message into non-updater and updater inventory messages.
Types ¶
type UpdateManager ¶
type UpdateManager struct {
// contains filtered or unexported fields
}
UpdateManager provides a concurrency safe update manager for handling all incoming Codechain entries and patch files.
func NewUpdateManager ¶
func NewUpdateManager(maxPeers int, treeHash, dataDir string) (*UpdateManager, error)
NewUpdateManager returns a new Fonero update manager. Use Start to begin processing asynchronous update inv updates.
func (*UpdateManager) QueueInv ¶
func (u *UpdateManager) QueueInv(inv *wire.MsgInv, p *peer.Peer)
QueueInv adds the passed inv message and peer to the update handling queue.
func (*UpdateManager) Start ¶
func (u *UpdateManager) Start()
Start begins the core update handler which processes Codechain entry and patch file inv messages.
func (*UpdateManager) Stop ¶
func (u *UpdateManager) Stop() error
Stop gracefully shuts down the update manager by stopping all asynchronous handlers and waiting for them to finish.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
chainstate
Package chainstate implements the hashchain state for the Fonero updater.
|
Package chainstate implements the hashchain state for the Fonero updater. |