package
0.1.3
Repository: https://github.com/amazechain/amc.git
Documentation: pkg.go.dev

# Packages

Package initialsync includes all initial block download and processing logic for the node, using a round robin strategy and a finite-state-machine to handle edge-cases in a beacon node's sync status.

# Functions

NewService initializes new regular sync service.
ReadChunkedBlock handles each response chunk that is sent by the peer and converts it into a beacon block.
ReadStatusCode response from a RPC stream.
SendBodiesByRangeRequest sends BeaconBlocksByRange and returns fetched blocks, if any.
SetRPCStreamDeadlines sets read and write deadlines for libp2p-based connection streams.
SetStreamReadDeadline for reading from libp2p connection streams, deciding when to close a connection based on a particular duration.
SetStreamWriteDeadline for writing to libp2p connection streams, deciding when to close a connection based on a particular duration.
No description provided by the author
No description provided by the author
No description provided by the author
WriteBlockChunk writes block chunk object to stream.

# Variables

ErrInvalidFetchedData is thrown if stream fails to provide requested blocks.
No description provided by the author

# Structs

Service is responsible for handling all run time p2p related operations as the main entry point for network messages.

# Interfaces

Checker defines a struct which can verify whether a node is currently synchronizing a chain with the rest of peers in the network.

# Type aliases

BlockProcessor defines a block processing function, which allows to start utilizing blocks even before all blocks are ready.
No description provided by the author