Documentation ¶
Index ¶
- Constants
- type PrepareVoteQueue
- func (p *PrepareVoteQueue) Empty() bool
- func (p *PrepareVoteQueue) Had(index uint32) bool
- func (p *PrepareVoteQueue) Len() int
- func (p *PrepareVoteQueue) Peek() []*protocols.PrepareVote
- func (p *PrepareVoteQueue) Pop() *protocols.PrepareVote
- func (p *PrepareVoteQueue) Push(vote *protocols.PrepareVote)
- func (p *PrepareVoteQueue) Top() *protocols.PrepareVote
- type ViewState
- func (vs *ViewState) AddPrepareBlock(pb *protocols.PrepareBlock)
- func (vs *ViewState) AddPrepareVote(id uint32, vote *protocols.PrepareVote)
- func (vs *ViewState) AddQC(qc *ctypes.QuorumCert)
- func (vs *ViewState) AddQCBlock(block *types.Block, qc *ctypes.QuorumCert)
- func (vs *ViewState) AddViewChange(id uint32, viewChange *protocols.ViewChange)
- func (vs *ViewState) AllPrepareVoteByIndex(index uint32) map[uint32]*protocols.PrepareVote
- func (vs *ViewState) AllViewChange() map[uint32]*protocols.ViewChange
- func (vs *ViewState) Deadline() time.Time
- func (vs *ViewState) Epoch() uint64
- func (vs *ViewState) Executing() (uint32, bool)
- func (vs *ViewState) FindBlock(hash common.Hash, number uint64) *types.Block
- func (vs *ViewState) FindPrepareVote(blockIndex, validatorIndex uint32) *protocols.PrepareVote
- func (vs *ViewState) HadSendPrepareVote() *PrepareVoteQueue
- func (vs *ViewState) HighestBlockString() string
- func (vs *ViewState) HighestCommitBlock() *types.Block
- func (vs *ViewState) HighestExecutedBlock() *types.Block
- func (vs *ViewState) HighestLockBlock() *types.Block
- func (vs *ViewState) HighestQCBlock() *types.Block
- func (vs *ViewState) IsDeadline() bool
- func (vs *ViewState) LastViewChangeQC() *ctypes.ViewChangeQC
- func (vs *ViewState) MarshalJSON() ([]byte, error)
- func (vs *ViewState) MaxQCIndex() uint32
- func (vs *ViewState) MaxViewBlockIndex() uint32
- func (vs *ViewState) MaxViewVoteIndex() uint32
- func (vs *ViewState) NextViewBlockIndex() uint32
- func (vs *ViewState) PendingPrepareVote() *PrepareVoteQueue
- func (vs *ViewState) PrepareBlockByIndex(index uint32) *protocols.PrepareBlock
- func (vs *ViewState) PrepareVoteLenByIndex(index uint32) int
- func (v ViewState) Reset()
- func (vs *ViewState) ResetView(epoch uint64, viewNumber uint64)
- func (vs *ViewState) SetExecuting(index uint32, finish bool)
- func (vs *ViewState) SetHighestCommitBlock(ext *types.Block)
- func (vs *ViewState) SetHighestLockBlock(ext *types.Block)
- func (vs *ViewState) SetHighestQCBlock(ext *types.Block)
- func (vs *ViewState) SetLastViewChangeQC(qc *ctypes.ViewChangeQC)
- func (vs *ViewState) SetViewTimer(viewInterval uint64)
- func (vs *ViewState) String() string
- func (vs *ViewState) ViewBlockAndQC(blockIndex uint32) (*types.Block, *ctypes.QuorumCert)
- func (vs *ViewState) ViewBlockByIndex(index uint32) *types.Block
- func (vs *ViewState) ViewBlockSize() int
- func (vs *ViewState) ViewChangeByIndex(index uint32) *protocols.ViewChange
- func (vs *ViewState) ViewChangeLen() int
- func (vs *ViewState) ViewNumber() uint64
- func (vs *ViewState) ViewString() string
- func (vs *ViewState) ViewTimeout() <-chan time.Time
- func (vs *ViewState) ViewVoteSize() int
Constants ¶
View Source
const DefaultEpoch = 1
View Source
const DefaultViewNumber = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrepareVoteQueue ¶
type PrepareVoteQueue struct {
Votes []*protocols.PrepareVote `json:"votes"`
}
func (*PrepareVoteQueue) Empty ¶
func (p *PrepareVoteQueue) Empty() bool
func (*PrepareVoteQueue) Had ¶
func (p *PrepareVoteQueue) Had(index uint32) bool
func (*PrepareVoteQueue) Len ¶
func (p *PrepareVoteQueue) Len() int
func (*PrepareVoteQueue) Peek ¶
func (p *PrepareVoteQueue) Peek() []*protocols.PrepareVote
func (*PrepareVoteQueue) Pop ¶
func (p *PrepareVoteQueue) Pop() *protocols.PrepareVote
func (*PrepareVoteQueue) Push ¶
func (p *PrepareVoteQueue) Push(vote *protocols.PrepareVote)
func (*PrepareVoteQueue) Top ¶
func (p *PrepareVoteQueue) Top() *protocols.PrepareVote
type ViewState ¶
type ViewState struct {
// contains filtered or unexported fields
}
func (*ViewState) AddPrepareBlock ¶
func (vs *ViewState) AddPrepareBlock(pb *protocols.PrepareBlock)
func (*ViewState) AddPrepareVote ¶
func (vs *ViewState) AddPrepareVote(id uint32, vote *protocols.PrepareVote)
func (*ViewState) AddQC ¶
func (vs *ViewState) AddQC(qc *ctypes.QuorumCert)
func (*ViewState) AddQCBlock ¶
func (vs *ViewState) AddQCBlock(block *types.Block, qc *ctypes.QuorumCert)
func (*ViewState) AddViewChange ¶
func (vs *ViewState) AddViewChange(id uint32, viewChange *protocols.ViewChange)
func (*ViewState) AllPrepareVoteByIndex ¶
func (vs *ViewState) AllPrepareVoteByIndex(index uint32) map[uint32]*protocols.PrepareVote
func (*ViewState) AllViewChange ¶
func (vs *ViewState) AllViewChange() map[uint32]*protocols.ViewChange
func (*ViewState) FindPrepareVote ¶
func (vs *ViewState) FindPrepareVote(blockIndex, validatorIndex uint32) *protocols.PrepareVote
func (*ViewState) HadSendPrepareVote ¶
func (vs *ViewState) HadSendPrepareVote() *PrepareVoteQueue
func (*ViewState) HighestBlockString ¶
func (*ViewState) HighestCommitBlock ¶
func (*ViewState) HighestExecutedBlock ¶
func (*ViewState) HighestLockBlock ¶
func (*ViewState) HighestQCBlock ¶
func (*ViewState) IsDeadline ¶
func (*ViewState) LastViewChangeQC ¶
func (vs *ViewState) LastViewChangeQC() *ctypes.ViewChangeQC
func (*ViewState) MarshalJSON ¶
func (*ViewState) MaxQCIndex ¶
func (*ViewState) MaxViewBlockIndex ¶ added in v0.7.3
func (*ViewState) MaxViewVoteIndex ¶ added in v0.7.3
func (*ViewState) NextViewBlockIndex ¶
func (*ViewState) PendingPrepareVote ¶
func (vs *ViewState) PendingPrepareVote() *PrepareVoteQueue
func (*ViewState) PrepareBlockByIndex ¶
func (vs *ViewState) PrepareBlockByIndex(index uint32) *protocols.PrepareBlock
func (*ViewState) PrepareVoteLenByIndex ¶
func (*ViewState) SetExecuting ¶
Set Executing block status
func (*ViewState) SetHighestCommitBlock ¶
func (*ViewState) SetHighestLockBlock ¶
func (*ViewState) SetHighestQCBlock ¶
func (*ViewState) SetLastViewChangeQC ¶
func (vs *ViewState) SetLastViewChangeQC(qc *ctypes.ViewChangeQC)
func (*ViewState) SetViewTimer ¶
func (*ViewState) ViewBlockAndQC ¶
func (*ViewState) ViewBlockByIndex ¶
Find the block corresponding to the current view according to the index
func (*ViewState) ViewBlockSize ¶
func (*ViewState) ViewChangeByIndex ¶
func (vs *ViewState) ViewChangeByIndex(index uint32) *protocols.ViewChange
func (*ViewState) ViewChangeLen ¶
func (*ViewState) ViewNumber ¶
func (*ViewState) ViewString ¶
func (*ViewState) ViewTimeout ¶
func (*ViewState) ViewVoteSize ¶
Click to show internal directories.
Click to hide internal directories.