chains

package
v0.4.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0, BSD-2-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChainsListener added in v1.0.3

func NewChainsListener(parent chain.ChainListener, accessNodesCB func(chainID isc.ChainID, accessNodes []*cryptolib.PublicKey)) chain.ChainListener

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,
	nodeConnection chain.NodeConnection,
	processorConfig *processors.Config,
	offledgerBroadcastUpToNPeers int,
	offledgerBroadcastInterval time.Duration,
	pullMissingRequestsFromCommittee bool,
	networkProvider peering.NetworkProvider,
	trustedNetworkManager peering.TrustedNetworkManager,
	chainStateStoreProvider database.ChainStateKVStoreProvider,
	walEnabled bool,
	walDir string,
	chainRecordRegistryProvider registry.ChainRecordRegistryProvider,
	dkShareRegistryProvider registry.DKShareRegistryProvider,
	nodeIdentityProvider registry.NodeIdentityProvider,
	consensusStateRegistry cmtLog.ConsensusStateRegistry,
	chainListener chain.ChainListener,
	shutdownCoordinator *shutdowncoordinator.ShutdownCoordinator,
) *Chains

func (*Chains) Activate

func (c *Chains) Activate(chainID isc.ChainID) error

Activate activates a chain in the node.

func (*Chains) Close added in v1.0.3

func (c *Chains) Close()

func (*Chains) Deactivate

func (c *Chains) Deactivate(chainID isc.ChainID) error

Deactivate a chain in the node.

func (*Chains) Get

func (c *Chains) Get(chainID isc.ChainID) 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) Run added in v1.0.3

func (c *Chains) Run(ctx context.Context) error

type Provider

type Provider func() *Chains // TODO: Use DI instead of that.

func (Provider) ChainProvider

func (chains Provider) ChainProvider() func(chainID isc.ChainID) chain.Chain

Directories

Path Synopsis
amDist
The algorithm here follows the specification `WaspChainAccessNodesV4.tla`.
The algorithm here follows the specification `WaspChainAccessNodesV4.tla`.

Jump to

Keyboard shortcuts

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