Documentation ¶
Index ¶
- Constants
- type Proposals
- func (proposals *Proposals) AddBlock(block *types.Block)
- func (proposals *Proposals) AddProposeProof(proposal *types.ProofProposal) (added bool, pending bool)
- func (proposals *Proposals) AddProposedBlock(proposal *types.BlockProposal, peerId peer.ID, receivingTime time.Time, ...) (added bool, pending bool)
- func (proposals *Proposals) ApproveBlock(hash common.Hash)
- func (proposals *Proposals) AvgTimeDiff(round uint64, start int64) decimal.Decimal
- func (proposals *Proposals) ClearPotentialForks()
- func (proposals *Proposals) CompleteRound(height uint64)
- func (proposals *Proposals) GetBlock(hash common.Hash) *types.Block
- func (proposals *Proposals) GetBlockByHash(round uint64, hash common.Hash) (*types.Block, error)
- func (proposals *Proposals) GetForkedPeers() mapset.Set
- func (proposals *Proposals) GetProposedBlock(round uint64, proposerPubKey []byte, timeout time.Duration) (*types.Block, error)
- func (proposals *Proposals) GetProposerPubKey(round uint64) []byte
- func (proposals *Proposals) HasPotentialFork() bool
- func (proposals *Proposals) ProcessPendingBlocks() []*types.BlockProposal
- func (proposals *Proposals) ProcessPendingProofs() []*types.ProofProposal
- func (proposals *Proposals) ProposerByRound(round uint64) (hash common.Hash, proposer []byte, ok bool)
- type ProposerByRound
- type Votes
- func (votes *Votes) AddVote(vote *types.Vote) bool
- func (votes *Votes) CompleteRound(round uint64)
- func (votes *Votes) FutureBlockExist(round uint64, neccessaryVotes int) bool
- func (votes *Votes) GetVoteByHash(hash common.Hash) *types.Vote
- func (votes *Votes) GetVotesOfRound(round uint64) *sync.Map
- func (votes *Votes) Initialize(head *types.Header)
Constants ¶
View Source
const ( MaxKnownVotes = 10000 VotesLag = 3 PropagateFutureVotesPeriod = 30 )
View Source
const (
DeferFutureProposalsPeriod = 30
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proposals ¶
type Proposals struct {
// contains filtered or unexported fields
}
func NewProposals ¶
func NewProposals(chain *blockchain.Blockchain, appState *appstate.AppState, detector *blockchain.OfflineDetector, upgrader *upgrade.Upgrader) (*Proposals, *sync.Map)
func (*Proposals) AddProposeProof ¶
func (proposals *Proposals) AddProposeProof(proposal *types.ProofProposal) (added bool, pending bool)
func (*Proposals) AddProposedBlock ¶
func (*Proposals) ApproveBlock ¶ added in v0.19.3
mark block as approved for adding to blockCache
func (*Proposals) AvgTimeDiff ¶
func (*Proposals) ClearPotentialForks ¶
func (proposals *Proposals) ClearPotentialForks()
func (*Proposals) CompleteRound ¶
func (*Proposals) GetBlockByHash ¶
func (*Proposals) GetForkedPeers ¶
func (proposals *Proposals) GetForkedPeers() mapset.Set
func (*Proposals) GetProposedBlock ¶
func (*Proposals) GetProposerPubKey ¶
func (*Proposals) HasPotentialFork ¶
func (*Proposals) ProcessPendingBlocks ¶
func (proposals *Proposals) ProcessPendingBlocks() []*types.BlockProposal
func (*Proposals) ProcessPendingProofs ¶
func (proposals *Proposals) ProcessPendingProofs() []*types.ProofProposal
type ProposerByRound ¶ added in v0.21.0
type Votes ¶
type Votes struct {
// contains filtered or unexported fields
}
func NewVotes ¶
func NewVotes(state *appstate.AppState, bus eventbus.Bus, offlineDetector *blockchain.OfflineDetector, upgrade *upgrade.Upgrader) *Votes
func (*Votes) CompleteRound ¶
func (*Votes) FutureBlockExist ¶
func (*Votes) Initialize ¶
Click to show internal directories.
Click to hide internal directories.