lachesis

package
v0.0.0-...-77adb20 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InmemLachesis

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

InmemLachesis implements the Consensus interface. It uses an inmemory Lachesis node.

func NewInmemLachesis

func NewInmemLachesis(config *config.LachesisConfig, logger *logrus.Logger) *InmemLachesis

NewInmemLachesis instantiates a new InmemLachesis consensus system

func (*InmemLachesis) Info

func (b *InmemLachesis) Info() (map[string]string, error)

Info returns Lachesis stats

func (*InmemLachesis) Init

func (b *InmemLachesis) Init(state *state.State, service *service.Service) error

Init instantiates a Lachesis inmemory node

func (*InmemLachesis) Run

func (b *InmemLachesis) Run() error

Run starts the Lachesis node

type InmemProxy

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

InmemProxy implements the Lachesis AppProxy interface

func NewInmemProxy

func NewInmemProxy(state *state.State,
	service *service.Service,
	submitCh chan []byte,
	logger *logrus.Logger) *InmemProxy

NewInmemProxy initializes and return a new InmemProxy

func (*InmemProxy) CommitBlock

func (i *InmemProxy) CommitBlock(block poset.Block) ([]byte, error)

CommitBlock commits Block to the State and expects the resulting state hash

func (*InmemProxy) GetSnapshot

func (i *InmemProxy) GetSnapshot(blockIndex int64) ([]byte, error)

TODO - Implement these two functions

func (*InmemProxy) Restore

func (i *InmemProxy) Restore(snapshot []byte) error

func (*InmemProxy) SubmitCh

func (i *InmemProxy) SubmitCh() chan []byte

SubmitCh is the channel through which the Service sends transactions to the node.

func (*InmemProxy) SubmitInternalCh

func (i *InmemProxy) SubmitInternalCh() chan poset.InternalTransaction

Jump to

Keyboard shortcuts

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