cbfttypes

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddValidatorEvent

type AddValidatorEvent struct {
	Node *enode.Node
}

type BlockSignature

type BlockSignature struct {
	SignHash  common.Hash // Signature hash,header[0:32]
	Hash      common.Hash // Block hash,header[:]
	Number    *big.Int
	Signature *common.BlockConfirmSign
}

Block's Signature info

func (*BlockSignature) Copy

func (bs *BlockSignature) Copy() *BlockSignature

type CbftResult

type CbftResult struct {
	Block              *types.Block
	ExtraData          []byte
	SyncState          chan error
	ChainStateUpdateCB func()
}

type ProducerState

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

func (*ProducerState) Add

func (ps *ProducerState) Add(miner common.Address)

func (*ProducerState) Get

func (ps *ProducerState) Get() (common.Address, int)

func (*ProducerState) Validate

func (ps *ProducerState) Validate(period int) bool

type RemoveValidatorEvent

type RemoveValidatorEvent struct {
	Node *enode.Node
}

type SortedValidatorNode added in v0.7.1

type SortedValidatorNode []*ValidateNode

func (SortedValidatorNode) Len added in v0.7.1

func (sv SortedValidatorNode) Len() int

func (SortedValidatorNode) Less added in v0.7.1

func (sv SortedValidatorNode) Less(i, j int) bool

func (SortedValidatorNode) Swap added in v0.7.1

func (sv SortedValidatorNode) Swap(i, j int)

type UpdateChainStateFn added in v0.7.1

type UpdateChainStateFn func(qcState, lockState, commitState *protocols.State)

type UpdateValidatorEvent

type UpdateValidatorEvent struct{}

type ValidateNode added in v0.7.1

type ValidateNode struct {
	Index     uint32             `json:"index"`
	Address   common.NodeAddress `json:"address"`
	PubKey    *ecdsa.PublicKey   `json:"-"`
	NodeID    enode.ID           `json:"nodeID"`
	BlsPubKey *bls.PublicKey     `json:"blsPubKey"`
}

func (*ValidateNode) String added in v0.7.1

func (vn *ValidateNode) String() string

func (*ValidateNode) Verify added in v0.7.1

func (vn *ValidateNode) Verify(data, sign []byte) error

type ValidateNodeMap added in v0.7.1

type ValidateNodeMap map[enode.ID]*ValidateNode

func (ValidateNodeMap) String added in v0.7.1

func (vnm ValidateNodeMap) String() string

type Validators added in v0.7.1

type Validators struct {
	Nodes            ValidateNodeMap `json:"validateNodes"`
	ValidBlockNumber uint64          `json:"validateBlockNumber"`
	// contains filtered or unexported fields
}

func (*Validators) Equal added in v0.7.1

func (vs *Validators) Equal(rsh *Validators) bool

func (*Validators) FindNodeByAddress added in v0.7.1

func (vs *Validators) FindNodeByAddress(addr common.NodeAddress) (*ValidateNode, error)

func (*Validators) FindNodeByID added in v0.7.1

func (vs *Validators) FindNodeByID(id enode.ID) (*ValidateNode, error)

func (*Validators) FindNodeByIndex added in v0.7.1

func (vs *Validators) FindNodeByIndex(index int) (*ValidateNode, error)

func (*Validators) Index added in v0.7.1

func (vs *Validators) Index(nodeID enode.ID) (uint32, error)

func (*Validators) Len added in v0.7.1

func (vs *Validators) Len() int

func (*Validators) NodeID added in v0.7.1

func (vs *Validators) NodeID(idx int) enode.ID

func (*Validators) NodeList added in v0.7.1

func (vs *Validators) NodeList() []enode.ID

func (*Validators) NodeListByBitArray added in v0.7.1

func (vs *Validators) NodeListByBitArray(vSet *utils.BitArray) ([]*ValidateNode, error)

func (*Validators) NodeListByIndexes added in v0.7.1

func (vs *Validators) NodeListByIndexes(indexes []uint32) ([]*ValidateNode, error)

func (*Validators) String added in v0.7.1

func (vs *Validators) String() string

Jump to

Keyboard shortcuts

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