Documentation ¶
Index ¶
- type Client
- func (rb *Client) Init(peerSub interfaces.PeerSubscription) error
- func (rb *Client) RequestP2PGetBlockHeaders(ctx context.Context, blockNums []uint32) ([]*objs.BlockHeader, error)
- func (rb *Client) RequestP2PGetMinedTxs(ctx context.Context, txHashes [][]byte) ([][]byte, error)
- func (rb *Client) RequestP2PGetPendingTx(ctx context.Context, txHashes [][]byte) ([][]byte, error)
- func (rb *Client) RequestP2PGetSnapShotHdrNode(ctx context.Context, key []byte) ([]byte, error)
- func (rb *Client) RequestP2PGetSnapShotNode(ctx context.Context, height uint32, key []byte) ([]byte, error)
- func (rb *Client) RequestP2PGetSnapShotStateData(ctx context.Context, key []byte) ([]byte, error)
- type Handler
- func (rb *Handler) Done() <-chan struct{}
- func (rb *Handler) Exit()
- func (rb *Handler) HandleP2PGetBlockHeaders(ctx context.Context, r *pb.GetBlockHeadersRequest) (*pb.GetBlockHeadersResponse, error)
- func (rb *Handler) HandleP2PGetMinedTxs(ctx context.Context, r *pb.GetMinedTxsRequest) (*pb.GetMinedTxsResponse, error)
- func (rb *Handler) HandleP2PGetPendingTxs(ctx context.Context, r *pb.GetPendingTxsRequest) (*pb.GetPendingTxsResponse, error)
- func (rb *Handler) HandleP2PGetSnapShotHdrNode(ctx context.Context, r *pb.GetSnapShotHdrNodeRequest) (*pb.GetSnapShotHdrNodeResponse, error)
- func (rb *Handler) HandleP2PGetSnapShotNode(ctx context.Context, r *pb.GetSnapShotNodeRequest) (*pb.GetSnapShotNodeResponse, error)
- func (rb *Handler) HandleP2PGetSnapShotStateData(ctx context.Context, r *pb.GetSnapShotStateDataRequest) (*pb.GetSnapShotStateDataResponse, error)
- func (rb *Handler) Init(database *db.Database, app appHandler) error
- func (rb *Handler) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client serves incoming requests and handles routing of outgoing requests for data from the consensus system.
func (*Client) Init ¶
func (rb *Client) Init(peerSub interfaces.PeerSubscription) error
Init initializes the object
func (*Client) RequestP2PGetBlockHeaders ¶
func (*Client) RequestP2PGetMinedTxs ¶
func (*Client) RequestP2PGetPendingTx ¶
func (*Client) RequestP2PGetSnapShotHdrNode ¶
func (*Client) RequestP2PGetSnapShotNode ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves incoming requests and handles routing of outgoing requests for data from the consensus system.
func (*Handler) Done ¶
func (rb *Handler) Done() <-chan struct{}
Done will trInger when both of the gossip busses have stopped
func (*Handler) HandleP2PGetBlockHeaders ¶
func (rb *Handler) HandleP2PGetBlockHeaders(ctx context.Context, r *pb.GetBlockHeadersRequest) (*pb.GetBlockHeadersResponse, error)
HandleP2PGetBlockHeaders serves block headers
func (*Handler) HandleP2PGetMinedTxs ¶
func (rb *Handler) HandleP2PGetMinedTxs(ctx context.Context, r *pb.GetMinedTxsRequest) (*pb.GetMinedTxsResponse, error)
HandleP2PGetMinedTxs returns the mined transactions from a specific block If the block number it is not known, it returns an empty byte slice.
func (*Handler) HandleP2PGetPendingTxs ¶
func (rb *Handler) HandleP2PGetPendingTxs(ctx context.Context, r *pb.GetPendingTxsRequest) (*pb.GetPendingTxsResponse, error)
HandleP2PGetPendingTxs serves pending txs
func (*Handler) HandleP2PGetSnapShotHdrNode ¶
func (rb *Handler) HandleP2PGetSnapShotHdrNode(ctx context.Context, r *pb.GetSnapShotHdrNodeRequest) (*pb.GetSnapShotHdrNodeResponse, error)
func (*Handler) HandleP2PGetSnapShotNode ¶
func (rb *Handler) HandleP2PGetSnapShotNode(ctx context.Context, r *pb.GetSnapShotNodeRequest) (*pb.GetSnapShotNodeResponse, error)
HandleP2PGetSnapShotNode ....
func (*Handler) HandleP2PGetSnapShotStateData ¶
func (rb *Handler) HandleP2PGetSnapShotStateData(ctx context.Context, r *pb.GetSnapShotStateDataRequest) (*pb.GetSnapShotStateDataResponse, error)
HandleP2PGetSnapShotStateData ....
Click to show internal directories.
Click to hide internal directories.