Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChainManager ¶
type ChainManager interface { UpdatesSince(types.ChainIndex, int) ([]chain.RevertUpdate, []chain.ApplyUpdate, error) Tip() types.ChainIndex TipState() consensus.State AddBlocks([]types.Block) error PoolTransactions() []types.Transaction V2PoolTransactions() []types.V2Transaction }
A ChainManager manages blockchain and txpool state.
type MineRequest ¶
MineRequest is the request type for [POST] /mine.
type Nodes ¶
type Nodes interface { Nodes() []nodes.Node MineBlocks(ctx context.Context, n int, rewardAddress types.Address) error ProxyRequest(ctx context.Context, filter, httpMethod, path string, r io.Reader) ([]nodes.ProxyResponse, error) }
Nodes manages the set of nodes in the cluster.
type ProxyResponse ¶
type ProxyResponse struct { NodeID nodes.NodeID `json:"nodeID"` StatusCode int `json:"statusCode"` Error string `json:"error,omitempty"` Data nodes.ProxyData `json:"data"` }
A ProxyResponse is the response for a proxied API request from a node.
type Syncer ¶
type Syncer interface { BroadcastHeader(bh gateway.BlockHeader) BroadcastTransactionSet(txns []types.Transaction) BroadcastV2TransactionSet(index types.ChainIndex, txns []types.V2Transaction) BroadcastV2BlockOutline(bo gateway.V2BlockOutline) }
A Syncer can connect to other peers and synchronize the blockchain.
Click to show internal directories.
Click to hide internal directories.