dummy

package
v0.0.0-...-168a2c3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInmemDummyApp

func NewInmemDummyApp(logger *logrus.Logger) proxy.AppProxy

NewInmemDummyApp constructor

Types

type DummyClient

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

DummyClient is a implementation of the dummy app. Lachesis and the app run in separate processes and communicate through proxy

func NewDummyClient

func NewDummyClient(lachesisProxy proxy.LachesisProxy, handler proxy.App, logger *logrus.Logger) (c *DummyClient, err error)

NewDummyClient instantiates an implementation of the dummy app

func NewDummySocketClient

func NewDummySocketClient(addr string, logger *logrus.Logger) (*DummyClient, error)

NewDummySocketClient constructor

func (*DummyClient) SubmitTx

func (c *DummyClient) SubmitTx(tx []byte) error

SubmitTx sends a transaction to node via proxy

type State

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

State implements ProxyHandler

func NewState

func NewState(logger *logrus.Logger) *State

NewState constructor

func (*State) CommitHandler

func (s *State) CommitHandler(block poset.Block) ([]byte, error)

CommitHandler triggers on block received

func (*State) GetCommittedTransactions

func (s *State) GetCommittedTransactions() [][]byte

GetCommittedTransactions returns all final transactions

func (*State) RestoreHandler

func (s *State) RestoreHandler(snapshot []byte) ([]byte, error)

RestoreHandler triggers on snapshot for a restore

func (*State) SnapshotHandler

func (s *State) SnapshotHandler(blockIndex int64) ([]byte, error)

SnapshotHandler triggers on snapshot restore

Jump to

Keyboard shortcuts

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