clique

package
v0.0.0-...-8f649d9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(ctx context.Context, config *consensus.Config, privateKey *ecdsa.PrivateKey, db storage.Storage, logger hclog.Logger) (consensus.Consensus, error)

Types

type Clique

type Clique struct {
}

Clique is a consensus algorithm for the clique protocol

func (*Clique) Close

func (c *Clique) Close() error

Close closes the connection

func (*Clique) Prepare

func (c *Clique) Prepare(chain consensus.ChainReader, header *types.Header) error

Prepare initializes the consensus fields of a block header according to the rules of a particular engine. The changes are executed inline.

func (*Clique) Seal

func (c *Clique) Seal(chain consensus.ChainReader, block *types.Block, ctx context.Context) (*types.Block, error)

Seal seals the block

func (*Clique) VerifyHeader

func (c *Clique) VerifyHeader(chain consensus.ChainReader, header *types.Header, uncle, seal bool) error

VerifyHeader verifies the header is correct

Jump to

Keyboard shortcuts

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