tortoise

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverTortoise added in v0.1.11

func RecoverTortoise(mdb database) (interface{}, error)

RecoverTortoise retrieve latest saved tortoise from the database

Types

type Tortoise

type Tortoise interface {
	HandleLateBlock(b *types.Block) (types.LayerID, types.LayerID)
	HandleIncomingLayer(ll *types.Layer) (types.LayerID, types.LayerID)
	LatestComplete() types.LayerID
	Persist() error
}

Tortoise represents an instance of a vote counting algorithm

func NewRecoveredTortoise added in v0.1.11

func NewRecoveredTortoise(mdb *mesh.DB, lg log.Log) Tortoise

NewRecoveredTortoise recovers a previously persisted tortoise copy from mesh.DB

func NewTortoise added in v0.1.11

func NewTortoise(layerSize int, mdb *mesh.DB, hdist int, lg log.Log) Tortoise

NewTortoise returns a new Tortoise instance

Jump to

Keyboard shortcuts

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