Documentation ¶
Overview ¶
Package syncer
@author: xwc1125
Package syncer ¶
@author: xwc1125
Package syncer ¶
@author: xwc1125
Package syncer ¶
@author: xwc1125
Package syncer ¶
@author: xwc1125
Package syncer ¶
@author: xwc1125
Package syncer ¶
@author: xwc1125
Package syncer ¶
@author: xwc1125
Index ¶
- Constants
- Variables
- func NewPeerBlock(header *models.Header) *peerBlock
- func NewSyncer(rootCtx context.Context, opts ...option) (protocol.Syncer, error)
- func WithApps(apps protocol.Apps) option
- func WithBlockRW(blockRW protocol.BlockReadWriter) option
- func WithHandshake(handshake protocol.Handshake) option
- func WithP2PService(p2pService protocol.P2PService) option
Constants ¶
View Source
const ( StatusMsg = 0x00 NewBlockHashesMsg = 0x01 TxMsg = 0x02 GetBlockHeadersMsg = 0x03 BlockHeadersMsg = 0x04 GetBlockBodiesMsg = 0x05 BlockBodiesMsg = 0x06 NewBlockMsg = 0x07 GetNodeDataMsg = 0x0d NodeDataMsg = 0x0e GetReceiptsMsg = 0x0f ReceiptsMsg = 0x10 )
Variables ¶
View Source
var ( MaxHashFetch = 512 // Amount of hashes to be fetched per retrieval request MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request MaxHeaderFetch = 192 // Amount of block headers to be fetched per retrieval request MaxSkeletonSize = 128 // Number of header fetches to need for a skeleton assembly MaxBodyFetch = 128 // Amount of block bodies to be fetched per retrieval request MaxReceiptFetch = 256 // Amount of transaction receipts to allow fetching per request MaxStateFetch = 384 // Amount of node state values to allow fetching per request )
Functions ¶
func NewPeerBlock ¶
func WithBlockRW ¶
func WithBlockRW(blockRW protocol.BlockReadWriter) option
func WithHandshake ¶
func WithP2PService ¶
func WithP2PService(p2pService protocol.P2PService) option
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.