chains

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0, BSD-2-Clause Imports: 14 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 *isc.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,
	rawBlocksEnabled bool,
	rawBlocksDir string,
) *Chains

func (*Chains) Activate

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

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

func (*Chains) ActivateAllFromRegistry

func (c *Chains) ActivateAllFromRegistry(registryProvider registry.Provider, allMetrics *metrics.Metrics, w *wal.WAL) 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 *isc.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 *isc.ChainID) chain.Chain

Jump to

Keyboard shortcuts

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