Documentation ¶
Index ¶
- Constants
- Variables
- func App() *node.Plugin
- func AwaitTransactionToBeBooked(txID transaction.ID, maxAwait time.Duration) error
- func FCOB() *consensus.FCOB
- func LedgerState() *valuetangle.LedgerState
- func Tangle() *valuetangle.Tangle
- func TipManager() *tipmanager.TipManager
- func ValueObjectFactory() *valuetangle.ValueObjectFactory
- func Voter() vote.DRNGRoundBasedVoter
- type PeerOpinionGiver
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 AwaitTransactionToBeBooked ¶
func AwaitTransactionToBeBooked(txID transaction.ID, maxAwait time.Duration) error
AwaitTransactionToBeBooked awaits maxAwait for the given transaction to get booked.
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.
Click to show internal directories.
Click to hide internal directories.