Documentation ¶
Index ¶
Constants ¶
View Source
const (
C_NumPrimeBlocksToDownload = 10
)
View Source
const ( // ProtocolVersion is the current version of the Quai protocol ProtocolVersion protocol.ID = "/quai/1.0.0" )
Variables ¶
This section is empty.
Functions ¶
func QuaiProtocolHandler ¶
func QuaiProtocolHandler(stream network.Stream, node QuaiP2PNode)
QuaiProtocolHandler handles all the incoming requests and responds with corresponding data
Types ¶
type QuaiP2PNode ¶
type QuaiP2PNode interface { // Search for a block in the node's cache, or query the consensus backend if it's not found in cache. // Returns nil if the block is not found. GetWorkObject(hash common.Hash, location common.Location) *types.WorkObject GetWorkObjectsFrom(hash common.Hash, location common.Location, count int) []*types.WorkObjectBlockView GetBlockHashByNumber(number *big.Int, location common.Location) *common.Hash GetRequestManager() requestManager.RequestManager GetBandwidthCounter() libp2pmetrics.Reporter Connect(peer.AddrInfo) error GetStream(peer.ID) (network.Stream, error) }
interface required to join the quai protocol network
Source Files ¶
Click to show internal directories.
Click to hide internal directories.