babble

package
v0.0.0-...-0eca64e Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InmemBabble

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

InmemBabble implementes the Consensus interface. It uses an inmemory Babble node.

func NewInmemBabble

func NewInmemBabble(config *config.BabbleConfig, logger *logrus.Logger) *InmemBabble

NewInmemBabble instantiates a new InmemBabble consensus system

func (*InmemBabble) Info

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

Info returns Babble stats

func (*InmemBabble) Init

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

Init instantiates a Babble inmemory node

func (*InmemBabble) Run

func (b *InmemBabble) Run() error

Run starts the Babble node

type InmemProxy

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

InmemProxy implements the Babble 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 (p *InmemProxy) CommitBlock(block hashgraph.Block) (proxy.CommitResponse, error)

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

func (*InmemProxy) GetSnapshot

func (p *InmemProxy) GetSnapshot(blockIndex int) ([]byte, error)

TODO - Implement these two functions

func (*InmemProxy) Restore

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

func (*InmemProxy) SubmitCh

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

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

Jump to

Keyboard shortcuts

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