solo

package
v0.0.0-...-77b6ffe Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BP               = iota  // block producer
	NBP                      // not block producer
	REMOVE_THRESHOLD = 65535 // height threshold of clearing block pool
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BP       bool   // this peer is block producer or not
	PrivKey  []byte // block producer's private key
	Extra    []byte // Extra data that will be stored in a new proposed block
	GasLimit uint64
}

type SoloEngine

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

func New

func New(config *common.Config, state *state.StateDB, chain chain.Blockchain) (*SoloEngine, error)

func (*SoloEngine) Address

func (solo *SoloEngine) Address() common.Address

func (*SoloEngine) Finalize

func (solo *SoloEngine) Finalize(header *types.Header, state *state.StateDB, txs types.Transactions, receipts types.Receipts) (*types.Block, error)

func (*SoloEngine) Protocols

func (solo *SoloEngine) Protocols() []common.Protocol

func (*SoloEngine) Start

func (solo *SoloEngine) Start() error

func (*SoloEngine) Stop

func (solo *SoloEngine) Stop() error

Jump to

Keyboard shortcuts

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