dpos

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Err_Elected = errors.New("the election has been passed")

Functions

This section is empty.

Types

type Cycle

type Cycle struct {
	DPosStatus dpos.IDPosStatus
}

func (*Cycle) CheckCycle

func (c *Cycle) CheckCycle(chain blockchain.IChain, preTime, time uint64) error

func (*Cycle) Elect

func (c *Cycle) Elect(time uint64, preHash arry.Hash, chain blockchain.IChain) error

type DPos

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

func NewDPos

func NewDPos(dPosStatus dpos.IDPosStatus) *DPos

func (*DPos) CheckCreator

func (d *DPos) CheckCreator(header types.IHeader, parent types.IHeader, chain blockchain.IChain) error

func (*DPos) CheckHeader

func (d *DPos) CheckHeader(header types.IHeader, parent types.IHeader, chain blockchain.IChain) error

func (*DPos) CheckSeal

func (d *DPos) CheckSeal(header types.IHeader, parent types.IHeader, chain blockchain.IChain) error

func (*DPos) CheckSigner

func (d *DPos) CheckSigner(header types.IHeader, chain blockchain.IChain) error

func (*DPos) CheckTime

func (d *DPos) CheckTime(header types.IHeader, chain blockchain.IChain) error

func (*DPos) Confirmed

func (d *DPos) Confirmed() uint64

func (*DPos) GenesisBlock

func (d *DPos) GenesisBlock() types.IBlock

func (*DPos) SetConfirmed

func (d *DPos) SetConfirmed(confirmed uint64)

func (*DPos) SuperIds

func (d *DPos) SuperIds() []string

Jump to

Keyboard shortcuts

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