Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsChecksum256Eq ¶
func IsChecksum256Eq(l, r types.Checksum256) bool
Types ¶
type BlockDB ¶
type BlockDB struct {
Peers map[string]*PeerBlockState
}
func (*BlockDB) DelBlockBefore ¶
type FastBlockVerifier ¶
type FastBlockVerifier struct {
// contains filtered or unexported fields
}
func NewFastBlockVerifier ¶
func NewFastBlockVerifier(peers []string, startBlock uint32, verifyHandler VerifyHandler) *FastBlockVerifier
NewFastBlockVerifier create
func (*FastBlockVerifier) OnBlock ¶
func (f *FastBlockVerifier) OnBlock(peer string, block *types.BlockGeneralInfo) error
OnBlock
func (*FastBlockVerifier) TryGetVerifyBlock ¶
func (f *FastBlockVerifier) TryGetVerifyBlock() (*blockItem, bool)
type PeerBlockState ¶
type PeerBlockState struct {
// contains filtered or unexported fields
}
func (*PeerBlockState) BlockLen ¶
func (p *PeerBlockState) BlockLen() int
func (*PeerBlockState) DelBlockBefore ¶
func (p *PeerBlockState) DelBlockBefore(num uint32)
DelFirstBlock
func (*PeerBlockState) GetBlock ¶
func (p *PeerBlockState) GetBlock(num uint32) *blockItem
GetFirstBlock
type VerifyHandler ¶
type VerifyHandler interface {
OnBlock(block *types.BlockGeneralInfo) error
}
Click to show internal directories.
Click to hide internal directories.