genesis

package
v0.9.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRecord

type BaseRecord struct {
	DB             store.DB
	DropModifier   drop.Modifier
	PulseAppender  pulse.Appender
	PulseAccessor  pulse.Accessor
	RecordModifier object.RecordModifier
	IndexModifier  object.IndexModifier
}

BaseRecord provides methods for genesis base record manipulation.

func (*BaseRecord) Create

func (br *BaseRecord) Create(ctx context.Context) error

Create creates new base genesis record if needed.

func (*BaseRecord) Done

func (br *BaseRecord) Done(ctx context.Context) error

Done saves genesis value. Should be called when all genesis steps finished properly.

func (*BaseRecord) IsGenesisRequired

func (br *BaseRecord) IsGenesisRequired(ctx context.Context) (bool, error)

IsGenesisRequired checks if genesis record already exists.

type DiscoveryNodeManager

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

DiscoveryNodeManager should be created by NewDiscoveryNodeManager.

func NewDiscoveryNodeManager

func NewDiscoveryNodeManager(
	am artifact.Manager,
) *DiscoveryNodeManager

NewDiscoveryNodeManager creates new DiscoveryNodeManager instance.

func (*DiscoveryNodeManager) StoreDiscoveryNodes

func (nm *DiscoveryNodeManager) StoreDiscoveryNodes(ctx context.Context, discoveryNodes []insolar.DiscoveryNodeRegister) error

StoreDiscoveryNodes saves discovery nodes objects and saves discovery nodes index in node domain index. If node domain index not empty this method does nothing.

type Genesis

type Genesis struct {
	ArtifactManager artifact.Manager
	BaseRecord      *BaseRecord

	DiscoveryNodes  []insolar.DiscoveryNodeRegister
	PluginsDir      string
	ContractsConfig insolar.GenesisContractsConfig
}

Genesis holds data and objects required for genesis on heavy node.

func (*Genesis) Start

func (g *Genesis) Start(ctx context.Context) error

Start implements components.Starter.

type Key

type Key struct{}

Key is genesis key.

func (Key) ID

func (Key) ID() []byte

func (Key) Scope

func (Key) Scope() store.Scope

Jump to

Keyboard shortcuts

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