valuetransfers

package
v0.2.4-0...-2c2ceb1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0, BSD-2-Clause Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName contains the human readable name of the plugin.
	PluginName = "ValueTransfers"

	// DefaultAverageNetworkDelay contains the default average time it takes for a network to propagate through gossip.
	DefaultAverageNetworkDelay = 5 * time.Second

	// CfgValueLayerSnapshotFile is the path to the snapshot file.
	CfgValueLayerSnapshotFile = "valueLayer.snapshot.file"

	// CfgValueLayerFCOBAverageNetworkDelay is the avg. network delay to use for FCoB rules
	CfgValueLayerFCOBAverageNetworkDelay = "valueLayer.fcob.averageNetworkDelay"
)
View Source
const (
	// FpcPluginName contains the human readable name of the plugin.
	FpcPluginName = "FPC"

	// CfgFPCQuerySampleSize defines how many nodes will be queried each round.
	CfgFPCQuerySampleSize = "fpc.querySampleSize"

	// CfgFPCRoundInterval defines how long a round lasts (in seconds)
	CfgFPCRoundInterval = "fpc.roundInterval"

	// CfgFPCBindAddress defines on which address the FPC service should listen.
	CfgFPCBindAddress = "fpc.bindAddress"
)

Variables

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

Functions

func App

func App() *node.Plugin

App gets the plugin instance.

func AwaitTransactionToBeBooked

func AwaitTransactionToBeBooked(txID transaction.ID, maxAwait time.Duration) error

AwaitTransactionToBeBooked awaits maxAwait for the given transaction to get booked.

func FCOB

func FCOB() *consensus.FCOB

FCOB gets the fcob instance. fcob contains the fcob consensus logic.

func LedgerState

func LedgerState() *valuetangle.LedgerState

LedgerState gets the ledgerState instance. ledgerState represents the ledger state, that keeps track of the liked branches and offers an API to access funds.

func Tangle

func Tangle() *valuetangle.Tangle

Tangle gets the tangle instance. tangle represents the value tangle that is used to express votes on value transactions.

func TipManager

func TipManager() *tipmanager.TipManager

TipManager returns the TipManager singleton.

func ValueObjectFactory

func ValueObjectFactory() *valuetangle.ValueObjectFactory

ValueObjectFactory returns the ValueObjectFactory singleton.

func Voter

func Voter() vote.DRNGRoundBasedVoter

Voter returns the DRNGRoundBasedVoter instance used by the FPC plugin.

Types

type PeerOpinionGiver

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

PeerOpinionGiver implements the OpinionGiver interface based on a peer.

func (*PeerOpinionGiver) ID

func (pog *PeerOpinionGiver) ID() string

ID returns a string representation of the identifier of the underlying Peer.

func (*PeerOpinionGiver) Query

func (pog *PeerOpinionGiver) Query(ctx context.Context, ids []string) (vote.Opinions, error)

Query queries another node for its opinion.

Directories

Path Synopsis
packages

Jump to

Keyboard shortcuts

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