dpos

package
v0.0.0-...-d85cb20 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: GPL-3.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CacheDir string
}

Config are the configuration parameters of the ethash.

type DacchainDpos

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

func New

func New() *DacchainDpos

func (*DacchainDpos) APIs

func (d *DacchainDpos) APIs(chain consensus.ChainReader) []rpc.API

APIs implements consensus.Engine, returning the user facing RPC APIs. Currently that is empty.

func (*DacchainDpos) Author

func (d *DacchainDpos) Author(header *types.Header) (common.Address, error)

func (*DacchainDpos) Finalize

func (d *DacchainDpos) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, dState *delegatestate.DelegateDB, txs []*types.Transaction, receipts []*types.Receipt) (*types.Block, error)

func (*DacchainDpos) Prepare

func (d *DacchainDpos) Prepare(chain consensus.ChainReader, header *types.Header) error

check parent exist and cache header

func (*DacchainDpos) VerifyBlockGenerate

func (d *DacchainDpos) VerifyBlockGenerate(chain consensus.ChainReader, block *types.Block, currentShuffleList *types.ShuffleList, blockInterval int) error

func (*DacchainDpos) VerifyHeader

func (d *DacchainDpos) VerifyHeader(chain consensus.ChainReader, header *types.Header) error

func (*DacchainDpos) VerifyHeaderAndSign

func (d *DacchainDpos) VerifyHeaderAndSign(chain consensus.ChainReader, block *types.Block, currentShuffleList *types.ShuffleList, blockInterval int) error

func (*DacchainDpos) VerifyHeaders

func (d *DacchainDpos) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header) (chan<- struct{}, <-chan error)

VerifyHeaders is similar to VerifyHeader, but verifies a batch of headers concurrently. The method returns a quit channel to abort the operations and a results channel to retrieve the async verifications.

func (*DacchainDpos) VerifySignatureSend

func (d *DacchainDpos) VerifySignatureSend(blockHash common.Hash, confirmSign []byte, currentShuffleList *types.ShuffleList) error

Jump to

Keyboard shortcuts

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