chains

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0, BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainProvider

type ChainProvider func(chainID *iscp.ChainID) chain.Chain

type Chains

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

func New

func New(
	log *logger.Logger,
	processorConfig *processors.Config,
	offledgerBroadcastUpToNPeers int,
	offledgerBroadcastInterval time.Duration,
	pullMissingRequestsFromCommittee bool,
	networkProvider peering.NetworkProvider,
	getOrCreateKVStore dbmanager.ChainKVStoreProvider,
) *Chains

func (*Chains) Activate

func (c *Chains) Activate(chr *registry.ChainRecord, registryProvider registry.Provider, allMetrics *metrics.Metrics) error

Activate activates chain on the Wasp node: - creates chain object - insert it into the runtime registry - subscribes for related transactions in he IOTA node

func (*Chains) ActivateAllFromRegistry

func (c *Chains) ActivateAllFromRegistry(registryProvider registry.Provider, allMetrics *metrics.Metrics) error

func (*Chains) Deactivate

func (c *Chains) Deactivate(chr *registry.ChainRecord) error

Deactivate deactivates chain in the node

func (*Chains) Dismiss

func (c *Chains) Dismiss()

func (*Chains) Get

func (c *Chains) Get(chainID *iscp.ChainID, includeDeactivated ...bool) chain.Chain

Get returns active chain object or nil if it doesn't exist lazy unsubscribing

func (*Chains) GetNodeConnectionMetrics added in v0.2.3

func (c *Chains) GetNodeConnectionMetrics() nodeconnmetrics.NodeConnectionMetrics

func (*Chains) SetNodeConn added in v0.2.3

func (c *Chains) SetNodeConn(nodeConn chain.NodeConnection)

type Provider

type Provider func() *Chains

func (Provider) ChainProvider

func (chains Provider) ChainProvider() func(chainID *iscp.ChainID) chain.Chain

Jump to

Keyboard shortcuts

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