messagelayer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0, BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName defines the plugin name.
	PluginName = "MessageLayer"
	// DefaultAverageNetworkDelay contains the default average time it takes for a network to propagate through gossip.
	DefaultAverageNetworkDelay = 5 * time.Second

	// CfgMessageLayerSnapshotFile is the path to the snapshot file.
	CfgMessageLayerSnapshotFile = "messageLayer.snapshot.file"

	// CfgMessageLayerFCOBAverageNetworkDelay is the avg. network delay to use for FCoB rules
	CfgMessageLayerFCOBAverageNetworkDelay = "messageLayer.fcob.averageNetworkDelay"

	// CfgTangleWidth is the width of the Tangle.
	CfgTangleWidth = "messageLayer.tangleWidth"
)

Variables

View Source
var (
	// ErrMessageWasNotBookedInTime is returned if a message did not get booked
	// within the defined await time.
	ErrMessageWasNotBookedInTime = errors.New("message could not be booked in time")
)

Functions

func AwaitMessageToBeBooked added in v0.4.0

func AwaitMessageToBeBooked(f func() (*tangle.Message, error), txID ledgerstate.TransactionID, maxAwait time.Duration) (*tangle.Message, error)

AwaitMessageToBeBooked awaits maxAwait for the given message to get booked.

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

func Tangle

func Tangle() *tangle.Tangle

Tangle gets the tangle instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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