Documentation
¶
Index ¶
- Constants
- Variables
- func ValidateMsg(pb proto.Message) error
- type ErrInvalidBase
- type ErrInvalidHeight
- type ErrReactorValidation
- type ErrUnknownMessageType
- type Reactor
- func (bcR *Reactor) AddPeer(peer p2p.Peer)
- func (bcR *Reactor) GetChannels() []*p2p.ChannelDescriptor
- func (bcR *Reactor) OnStart() error
- func (bcR *Reactor) OnStop()
- func (bcR *Reactor) Receive(e p2p.Envelope)
- func (bcR *Reactor) RemovePeer(peer p2p.Peer, _ interface{})
- func (bcR *Reactor) SetLogger(l log.Logger)
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 ¶
func NewReactor(state sm.State, store *store.BlockStore, localPeerID p2p.ID, celestiaCfg *relayer.CelestiaConfig, genDoc *types.GenesisDoc, clientCtx client.Context, cmtConfig *cfg.Config, celestiaPollInterval time.Duration, celestiaNamespace string, chainID string, ) *Reactor
NewReactor returns new reactor instance.
func (*Reactor) GetChannels ¶
func (bcR *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.