gossip

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PLUGIN = node.NewPlugin("Gossip", node.Enabled, configure, run)
)

Functions

func AddRequestBackpressureSignal added in v0.4.0

func AddRequestBackpressureSignal(reqFunc func() bool)

func BroadcastHeartbeat added in v0.4.0

func BroadcastHeartbeat(filter func(p *peer.Peer) bool)

BroadcastHeartbeat broadcasts a heartbeat message to every connected peer who supports STING.

func BroadcastMilestoneRequests added in v0.4.0

func BroadcastMilestoneRequests(rangeToRequest int, onExistingMilestoneInRange func(index milestone.Index), from ...milestone.Index) int

BroadcastMilestoneRequests broadcasts up to N requests for milestones nearest to the current solid milestone index to every connected peer who supports STING. Returns the number of milestones requested.

func BroadcastQueue added in v0.4.0

func BroadcastQueue() bqueue.Queue

BroadcastQueue returns the broadcast queue instance of the gossip plugin.

func MemoizedRequestMissingMilestoneApprovees added in v0.4.0

func MemoizedRequestMissingMilestoneApprovees(preventDiscard ...bool) func(ms milestone.Index)

MemoizedRequestMissingMilestoneApprovees returns a function which traverses the approvees of a given milestone and requests each missing approvee. As a special property, invocations of the yielded function share the same 'already traversed' set to circumvent requesting the same approvees multiple times.

func Processor added in v0.4.0

func Processor() *processor.Processor

Processor returns the message processor instance of the gossip plugin.

func Request

func Request(hash hornet.Hash, msIndex milestone.Index, preventDiscard ...bool) bool

Request enqueues a request to the request queue for the given transaction if it isn't a solid entry point and is not contained in the database already.

func RequestApprovees

func RequestApprovees(cachedTx *tangle.CachedTransaction, msIndex milestone.Index, preventDiscard ...bool)

RequestApprovees enqueues requests for the approvees of the given transaction to the request queue, if the given transaction is not a solid entry point and neither its approvees are and also not in the database.

func RequestMilestoneApprovees added in v0.4.0

func RequestMilestoneApprovees(cachedMsBndl *tangle.CachedBundle) bool

RequestMilestoneApprovees enqueues requests for the approvees of the given milestone bundle to the request queue, if the approvees are not solid entry points and not already in the database.

func RequestMultiple added in v0.4.0

func RequestMultiple(hashes hornet.Hashes, msIndex milestone.Index, preventDiscard ...bool) int

RequestMultiple works like Request but takes multiple transaction hashes.

func RequestQueue

func RequestQueue() rqueue.Queue

RequestQueue returns the request queue instance of the gossip plugin.

Types

This section is empty.

Jump to

Keyboard shortcuts

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