Documentation ¶
Index ¶
- Constants
- type Proof
- type Proposals
- func (proposals *Proposals) AddBlock(block *types.Block)
- func (proposals *Proposals) AddProposeProof(p []byte, hash common.Hash, pubKey []byte, round uint64) (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() []*Proof
- 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) (*Proposals, *sync.Map, *sync.Map)
func (*Proposals) AddProposeProof ¶
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 ¶
type Votes ¶
type Votes struct {
// contains filtered or unexported fields
}
func NewVotes ¶
func NewVotes(state *appstate.AppState, bus eventbus.Bus, offlineDetector *blockchain.OfflineDetector) *Votes
func (*Votes) CompleteRound ¶
func (*Votes) FutureBlockExist ¶
func (*Votes) Initialize ¶
Click to show internal directories.
Click to hide internal directories.