Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NOTE: keep up to date with bcproto.BlockResponse BlockResponseMessagePrefixSize = 4 BlockResponseMessageFieldKeySize = 1 MaxMsgSize = types.MaxBlockSizeBytes + BlockResponseMessagePrefixSize + BlockResponseMessageFieldKeySize )
View Source
const ( // BlocksyncChannel is a channel for blocks and status updates (`BlockStore` height) BlocksyncChannel = byte(0x40) )
Variables ¶
View Source
var ( // ErrNilMessage is returned when provided message is empty ErrNilMessage = errors.New("message cannot be nil") )
Functions ¶
Types ¶
type ErrInvalidBase ¶
ErrInvalidBase is returned when peer informs of a status with invalid base
func (ErrInvalidBase) Error ¶
func (e ErrInvalidBase) Error() string
type ErrInvalidHeight ¶
ErrInvalidBase is returned when peer informs of a status with invalid height
func (ErrInvalidHeight) Error ¶
func (e ErrInvalidHeight) Error() string
type ErrReactorValidation ¶
type ErrReactorValidation struct {
Err error
}
func (ErrReactorValidation) Error ¶
func (e ErrReactorValidation) Error() string
func (ErrReactorValidation) Unwrap ¶
func (e ErrReactorValidation) Unwrap() error
type ErrUnknownMessageType ¶
func (ErrUnknownMessageType) Error ¶
func (e ErrUnknownMessageType) Error() string
type Reactor ¶
type Reactor struct { p2p.BaseReactor // contains filtered or unexported fields }
Reactor handles long-term catchup syncing.
func NewReactor ¶
NewReactor returns new reactor instance.
func (*Reactor) FoundStatus ¶
func (*Reactor) GetChannels ¶
func (ecR *Reactor) GetChannels() []*p2p.ChannelDescriptor
GetChannels implements Reactor
func (*Reactor) RemovePeer ¶
RemovePeer implements Reactor by removing peer from the pool.
Click to show internal directories.
Click to hide internal directories.