Documentation ¶
Index ¶
- func HandleBlockBlueWorkRequests(context BlockBlueWorkRequestsContext, incomingRoute *router.Route, ...) error
- func HandleIBDBlockLocator(context HandleIBDBlockLocatorContext, incomingRoute *router.Route, ...) error
- func HandleIBDBlockRequests(context HandleIBDBlockRequestsContext, incomingRoute *router.Route, ...) error
- func HandlePruningPointAndItsAnticoneRequests(context PruningPointAndItsAnticoneRequestsContext, incomingRoute *router.Route, ...) error
- func HandleRelayBlockRequests(context RelayBlockRequestsContext, incomingRoute *router.Route, ...) error
- func HandleRelayInvs(context RelayInvsContext, incomingRoute *router.Route, ...) error
- func HandleRequestBlockLocator(context RequestBlockLocatorContext, incomingRoute *router.Route, ...) error
- func HandleRequestHeaders(context RequestHeadersContext, incomingRoute *router.Route, ...) error
- func HandleRequestPruningPointUTXOSet(context HandleRequestPruningPointUTXOSetContext, ...) error
- func SendVirtualSelectedParentInv(context SendVirtualSelectedParentInvContext, outgoingRoute *router.Route, ...) error
- type BlockBlueWorkRequestsContext
- type HandleIBDBlockLocatorContext
- type HandleIBDBlockRequestsContext
- type HandleRequestPruningPointUTXOSetContext
- type PruningPointAndItsAnticoneRequestsContext
- type RelayBlockRequestsContext
- type RelayInvsContext
- type RequestBlockLocatorContext
- type RequestHeadersContext
- type SendVirtualSelectedParentInvContext
- type SharedRequestedBlocks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleBlockBlueWorkRequests ¶
func HandleBlockBlueWorkRequests(context BlockBlueWorkRequestsContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peerpkg.Peer) error
HandleBlockBlueWorkRequests listens to appmessage.MsgRequestBlockBlueWork messages and sends their corresponding blue work to the requesting peer.
func HandleIBDBlockLocator ¶
func HandleIBDBlockLocator(context HandleIBDBlockLocatorContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peer.Peer) error
HandleIBDBlockLocator listens to appmessage.MsgIBDBlockLocator messages and sends the highest known block that's in the selected parent chain of `targetHash` to the requesting peer.
func HandleIBDBlockRequests ¶
func HandleIBDBlockRequests(context HandleIBDBlockRequestsContext, incomingRoute *router.Route, outgoingRoute *router.Route) error
HandleIBDBlockRequests listens to appmessage.MsgRequestRelayBlocks messages and sends their corresponding blocks to the requesting peer.
func HandlePruningPointAndItsAnticoneRequests ¶ added in v0.11.0
func HandlePruningPointAndItsAnticoneRequests(context PruningPointAndItsAnticoneRequestsContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peerpkg.Peer) error
HandlePruningPointAndItsAnticoneRequests listens to appmessage.MsgRequestPruningPointAndItsAnticone messages and sends the pruning point and its anticone to the requesting peer.
func HandleRelayBlockRequests ¶
func HandleRelayBlockRequests(context RelayBlockRequestsContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peerpkg.Peer) error
HandleRelayBlockRequests listens to appmessage.MsgRequestRelayBlocks messages and sends their corresponding blocks to the requesting peer.
func HandleRelayInvs ¶
func HandleRelayInvs(context RelayInvsContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peerpkg.Peer) error
HandleRelayInvs listens to appmessage.MsgInvRelayBlock messages, requests their corresponding blocks if they are missing, adds them to the DAG and propagates them to the rest of the network.
func HandleRequestBlockLocator ¶
func HandleRequestBlockLocator(context RequestBlockLocatorContext, incomingRoute *router.Route, outgoingRoute *router.Route) error
HandleRequestBlockLocator handles getBlockLocator messages
func HandleRequestHeaders ¶
func HandleRequestHeaders(context RequestHeadersContext, incomingRoute *router.Route, outgoingRoute *router.Route, peer *peer.Peer) error
HandleRequestHeaders handles RequestHeaders messages
func HandleRequestPruningPointUTXOSet ¶ added in v0.11.0
func HandleRequestPruningPointUTXOSet(context HandleRequestPruningPointUTXOSetContext, incomingRoute, outgoingRoute *router.Route) error
HandleRequestPruningPointUTXOSet listens to appmessage.MsgRequestPruningPointUTXOSet messages and sends the pruning point UTXO set and block body.
func SendVirtualSelectedParentInv ¶
func SendVirtualSelectedParentInv(context SendVirtualSelectedParentInvContext, outgoingRoute *router.Route, peer *peerpkg.Peer) error
SendVirtualSelectedParentInv sends a peer the selected parent hash of the virtual
Types ¶
type BlockBlueWorkRequestsContext ¶
BlockBlueWorkRequestsContext is the interface for the context needed for the HandleBlockBlueWorkRequests flow.
type HandleIBDBlockLocatorContext ¶
HandleIBDBlockLocatorContext is the interface for the context needed for the HandleIBDBlockLocator flow.
type HandleIBDBlockRequestsContext ¶
HandleIBDBlockRequestsContext is the interface for the context needed for the HandleIBDBlockRequests flow.
type HandleRequestPruningPointUTXOSetContext ¶ added in v0.11.0
HandleRequestPruningPointUTXOSetContext is the interface for the context needed for the HandleRequestPruningPointUTXOSet flow.
type PruningPointAndItsAnticoneRequestsContext ¶ added in v0.11.0
PruningPointAndItsAnticoneRequestsContext is the interface for the context needed for the HandlePruningPointAndItsAnticoneRequests flow.
type RelayBlockRequestsContext ¶
RelayBlockRequestsContext is the interface for the context needed for the HandleRelayBlockRequests flow.
type RelayInvsContext ¶
type RelayInvsContext interface { Domain() domain.Domain Config() *config.Config OnNewBlock(block *externalapi.DomainBlock, blockInsertionResult *externalapi.BlockInsertionResult) error OnPruningPointUTXOSetOverride() error Broadcast(message appmessage.Message) error AddOrphan(orphanBlock *externalapi.DomainBlock) GetOrphanRoots(orphanHash *externalapi.DomainHash) ([]*externalapi.DomainHash, bool, error) IsOrphan(blockHash *externalapi.DomainHash) bool IsIBDRunning() bool TrySetIBDRunning(ibdPeer *peerpkg.Peer) bool UnsetIBDRunning() IsRecoverableError(err error) bool }
RelayInvsContext is the interface for the context needed for the HandleRelayInvs flow.
type RequestBlockLocatorContext ¶
RequestBlockLocatorContext is the interface for the context needed for the HandleRequestBlockLocator flow.
type RequestHeadersContext ¶ added in v0.11.0
RequestHeadersContext is the interface for the context needed for the HandleRequestHeaders flow.
type SendVirtualSelectedParentInvContext ¶
type SendVirtualSelectedParentInvContext interface { Domain() domain.Domain Config() *config.Config }
SendVirtualSelectedParentInvContext is the interface for the context needed for the SendVirtualSelectedParentInv flow.
type SharedRequestedBlocks ¶
type SharedRequestedBlocks struct { // contains filtered or unexported fields }
SharedRequestedBlocks is a data structure that is shared between peers that holds the hashes of all the requested blocks to prevent redundant requests.
func NewSharedRequestedBlocks ¶
func NewSharedRequestedBlocks() *SharedRequestedBlocks
NewSharedRequestedBlocks returns a new instance of SharedRequestedBlocks.
Source Files ¶
- block_locator.go
- handle_block_blue_work_requests.go
- handle_ibd_block_locator.go
- handle_ibd_block_requests.go
- handle_pruning_point_and_its_anticone_requests.go
- handle_relay_block_requests.go
- handle_relay_invs.go
- handle_request_block_locator.go
- handle_request_headers.go
- handle_request_pruning_point_utxo_set.go
- ibd.go
- ibd_with_headers_proof.go
- log.go
- send_virtual_selected_parent_inv.go
- shared_requested_blocks.go