core

package
v22.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(backend istanbul.Backend, config *istanbul.Config) istanbul.Core

New creates an Istanbul consensus core

func PrepareCommittedSeal

func PrepareCommittedSeal(header *types.Header, round uint32) []byte

PrepareCommittedSeal returns a committed seal for the given header and takes current round under consideration

Types

type Request

type Request struct {
	Proposal        istanbul.Proposal
	RCMessages      *qbftMsgSet
	PrepareMessages []*qbfttypes.Prepare
}

Request is used to construct a Preprepare message

type State

type State uint64
const (
	StateAcceptRequest State = iota
	StatePreprepared
	StatePrepared
	StateCommitted
)

func (State) Cmp

func (s State) Cmp(y State) int

Cmp compares s and y and returns:

-1 if s is the previous state of y
 0 if s and y are the same state
+1 if s is the next state of y

func (State) String

func (s State) String() string

type Subject

type Subject struct {
	View   *istanbul.View
	Digest common.Hash
}

Subject represents the message sent when msgPrepare and msgCommit is broadcasted

func (*Subject) String

func (b *Subject) String() string

Jump to

Keyboard shortcuts

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