chains

package
v0.3.29 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ECRecoverAddress

func ECRecoverAddress(hash, sig []byte) (common.Address, error)

func RecoverCommitterAddressesVals

func RecoverCommitterAddressesVals(headerHash []byte, seals [][]byte) (map[common.Address][]byte, error)

Types

type ConsensusType added in v0.3.29

type ConsensusType uint8
const (
	Unspecified ConsensusType = iota
	IBFT2
	QBFT
)

func (ConsensusType) String added in v0.3.29

func (c ConsensusType) String() string

type ParsedHeader

type ParsedHeader struct {
	Base *gethtypes.Header

	Vanity     []byte
	Validators []common.Address
	Vote       interface{}
	Round      []byte
	Seals      [][]byte
}

func ParseHeader

func ParseHeader(header *gethtypes.Header) (*ParsedHeader, error)

func (ParsedHeader) GetSealingHeaderBytes

func (h ParsedHeader) GetSealingHeaderBytes(consensusType ConsensusType) ([]byte, error)

func (ParsedHeader) ValidateAndGetCommitSeals

func (h ParsedHeader) ValidateAndGetCommitSeals(consensusType ConsensusType) ([][]byte, error)

Jump to

Keyboard shortcuts

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