Documentation ¶
Index ¶
Constants ¶
View Source
const ( MethodGetTxs = "GetTxs" MaxGetTxsResponseTime = 5 * time.Second MaxGetTxsCount = 128 MaxGetTxsParallelRequests = 5 )
Constants related to the GetTxs method.
View Source
const TxSyncProtocolID = "txsync"
TxSyncProtocolID is a unique protocol identifier for the transaction sync protocol.
Variables ¶
View Source
var TxSyncProtocolVersion = version.Version{Major: 1, Minor: 0, Patch: 0}
TxSyncProtocolVersion is the supported version of the transaction sync protocol.
Functions ¶
Types ¶
type Client ¶
type Client interface { // GetTxs queries peers for transaction data. GetTxs(ctx context.Context, request *GetTxsRequest) (*GetTxsResponse, error) }
Client is a transaction sync protocol client.
type GetTxsRequest ¶
GetTxsRequest is a GetTxs request.
type GetTxsResponse ¶
type GetTxsResponse struct {
Txs [][]byte `json:"txs,omitempty"`
}
GetTxsResponse is a response to a GetTxs request.
Click to show internal directories.
Click to hide internal directories.