Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactBlock ¶
type CompactBlock struct { Header *core.BlockHeader ShortIDs []uint64 PrefilledTxs []*core.Transaction }
func NewCompactBlock ¶
func NewCompactBlock(block *core.Block) *CompactBlock
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) RegisterHandler ¶
func (h *Handler) RegisterHandler(msgType MessageType, handler func([]byte) error)
type Message ¶
type Message struct { Type MessageType Payload []byte }
func NewMessage ¶
func NewMessage(msgType MessageType, payload []byte) *Message
type MessageType ¶
type MessageType uint8
const ( MsgTypeBlock MessageType = iota MsgTypeTx MsgTypePing MsgTypePong MsgTypeGetBlocks MsgTypeGetData )
type SyncManager ¶
type SyncManager struct {
// contains filtered or unexported fields
}
func NewSyncManager ¶
func NewSyncManager(blockchain *core.Blockchain) *SyncManager
Click to show internal directories.
Click to hide internal directories.