Documentation ¶
Index ¶
- Constants
- type BHReactor
- func (bhR *BHReactor) AddPeer(peer p2p.Peer)
- func (bhR *BHReactor) Communicate(stream pb.P2PService_CommunicateServer) error
- func (bhR *BHReactor) GetChannels() []*p2p.ChannelDescriptor
- func (bhR *BHReactor) OnStart() error
- func (bhR *BHReactor) OnStop()
- func (bhR *BHReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte)
- func (bhR *BHReactor) RemovePeer(peer p2p.Peer, reason interface{})
- type Hash
Constants ¶
const ( // BHMsgChannel id BHMsgChannel = byte(0x70) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BHReactor ¶
type BHReactor struct { p2p.BaseReactor // BaseService + p2p.Switch // contains filtered or unexported fields }
BHReactor defines a reactor for the key manager service.
func NewBHReactor ¶
NewBHReactor returns a new BHReactor.
func (*BHReactor) Communicate ¶
func (bhR *BHReactor) Communicate(stream pb.P2PService_CommunicateServer) error
func (*BHReactor) GetChannels ¶
func (bhR *BHReactor) GetChannels() []*p2p.ChannelDescriptor
GetChannels implements Reactor
func (*BHReactor) OnStart ¶
OnStart implements BaseService by subscribing to events, which later will be broadcasted to other peers and starting state if we're not in fast sync.
func (*BHReactor) OnStop ¶
func (bhR *BHReactor) OnStop()
OnStop implements BaseService by unsubscribing from events and stopping state.
func (*BHReactor) Receive ¶
Receive implements Reactor NOTE: We process these messages even when we're fast_syncing. Messages affect either a peer state or the consensus state. Peer state updates can happen in parallel, but processing of proposals, block parts, and votes are ordered by the receiveRoutine NOTE: blocks on consensus state for proposals, block parts, and votes
func (*BHReactor) RemovePeer ¶
RemovePeer implements Reactor