Versions in this module Expand all Collapse all v0 v0.38.3 Jan 4, 2024 Changes in this version + const BlockResponseMessageFieldKeySize + const BlockResponseMessagePrefixSize + const BlocksyncChannel + const MaxMsgSize + const MetricsSubsystem + var ErrNilMessage = errors.New("message cannot be nil") + func ValidateMsg(pb proto.Message) error + type BlockPool struct + func NewBlockPool(start int64, requestsCh chan<- BlockRequest, errorsCh chan<- peerError) *BlockPool + func (pool *BlockPool) AddBlock(peerID p2p.ID, block *types.Block, extCommit *types.ExtendedCommit, ...) error + func (pool *BlockPool) GetStatus() (height int64, numPending int32, lenRequesters int) + func (pool *BlockPool) IsCaughtUp() bool + func (pool *BlockPool) MaxPeerHeight() int64 + func (pool *BlockPool) OnStart() error + func (pool *BlockPool) PeekTwoBlocks() (first, second *types.Block, firstExtCommit *types.ExtendedCommit) + func (pool *BlockPool) PopRequest() + func (pool *BlockPool) RedoRequest(height int64) p2p.ID + func (pool *BlockPool) RemovePeer(peerID p2p.ID) + func (pool *BlockPool) SetPeerRange(peerID p2p.ID, base int64, height int64) + type BlockRequest struct + Height int64 + PeerID p2p.ID + type ErrInvalidBase struct + Base int64 + Reason string + func (e ErrInvalidBase) Error() string + type ErrInvalidHeight struct + Height int64 + Reason string + func (e ErrInvalidHeight) Error() string + type ErrReactorValidation struct + Err error + func (e ErrReactorValidation) Error() string + func (e ErrReactorValidation) Unwrap() error + type ErrUnknownMessageType struct + Msg proto.Message + func (e ErrUnknownMessageType) Error() string + type Metrics struct + BlockSizeBytes metrics.Gauge + LatestBlockHeight metrics.Gauge + NumTxs metrics.Gauge + Syncing metrics.Gauge + TotalTxs metrics.Gauge + func NopMetrics() *Metrics + func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics + type Reactor struct + func NewReactor(state sm.State, blockExec *sm.BlockExecutor, store *store.BlockStore, ...) *Reactor + func (bcR *Reactor) AddPeer(peer p2p.Peer) + func (bcR *Reactor) BroadcastStatusRequest() + 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) + func (bcR *Reactor) SwitchToBlockSync(state sm.State) error