protos

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkPullReqPacketToProto

func BulkPullReqPacketToProto(bp *BulkPullReqPacket) ([]byte, error)

ToProto converts domain BulkPull into proto BulkPull

func BulkPullRspPacketToProto

func BulkPullRspPacketToProto(bp *BulkPullRspPacket) ([]byte, error)

ToProto converts domain BulkPull into proto BulkPull

func BulkPushBlockToProto

func BulkPushBlockToProto(bp *BulkPush) ([]byte, error)

ToProto converts domain BulkPush into proto BulkPush

func ConfirmAckBlockToProto

func ConfirmAckBlockToProto(confirmAck *ConfirmAckBlock) ([]byte, error)

ToProto converts domain ConfirmAckBlock into proto ConfirmAckBlock

func ConfirmReqBlockToProto

func ConfirmReqBlockToProto(confirmReq *ConfirmReqBlock) ([]byte, error)

ToProto converts domain ConfirmReqBlock into proto ConfirmReqBlock

func FrontierReqToProto

func FrontierReqToProto(fr *FrontierReq) ([]byte, error)

ToProto converts domain frontier into proto frontier

func FrontierResponseToProto

func FrontierResponseToProto(fr *FrontierResponse) ([]byte, error)

ToProto converts domain FrontierResponse into proto FrontierResponse

func PublishBlockToProto

func PublishBlockToProto(publish *PublishBlock) ([]byte, error)

ToProto converts domain PublishBlock into proto PublishBlock

Types

type Bulk

type Bulk struct {
	StartHash types.Hash
	EndHash   types.Hash
}

type BulkPullReqPacket

type BulkPullReqPacket struct {
	StartHash types.Hash
	EndHash   types.Hash
}

func BulkPullReqPacketFromProto

func BulkPullReqPacketFromProto(data []byte) (*BulkPullReqPacket, error)

BulkPullPacketFromProto parse the data into BulkPull message

func NewBulkPullReqPacket

func NewBulkPullReqPacket(start, end types.Hash) (packet *BulkPullReqPacket)

type BulkPullRspPacket

type BulkPullRspPacket struct {
	Blk *types.StateBlock
}

func BulkPullRspPacketFromProto

func BulkPullRspPacketFromProto(data []byte) (*BulkPullRspPacket, error)

BulkPullPacketFromProto parse the data into BulkPull message

type BulkPush

type BulkPush struct {
	Blk *types.StateBlock
}

func BulkPushBlockFromProto

func BulkPushBlockFromProto(data []byte) (*BulkPush, error)

BulkPushBlockFromProto parse the data into BulkPush message

type ConfirmAckBlock

type ConfirmAckBlock struct {
	Account   types.Address
	Signature types.Signature
	Sequence  uint32
	Blk       *types.StateBlock
}

func ConfirmAckBlockFromProto

func ConfirmAckBlockFromProto(data []byte) (*ConfirmAckBlock, error)

ConfirmAckBlockFromProto parse the data into ConfirmAckBlock message

type ConfirmReqBlock

type ConfirmReqBlock struct {
	Blk *types.StateBlock
}

func ConfirmReqBlockFromProto

func ConfirmReqBlockFromProto(data []byte) (*ConfirmReqBlock, error)

ConfirmReqBlockFromProto parse the data into ConfirmReqBlock message

type FrontierReq

type FrontierReq struct {
	StartAddress types.Address
	Age          uint32
	Count        uint32
}

func FrontierReqFromProto

func FrontierReqFromProto(data []byte) (*FrontierReq, error)

FrontierReqFromProto parse the data into frontier message

func NewFrontierReq

func NewFrontierReq(addr types.Address, Age, Count uint32) (packet *FrontierReq)

type FrontierResponse

type FrontierResponse struct {
	Frontier         *types.Frontier
	TotalFrontierNum uint32
}

func FrontierResponseFromProto

func FrontierResponseFromProto(data []byte) (*FrontierResponse, error)

FrontierResponseFromProto parse the data into frontier message

func NewFrontierRsp

func NewFrontierRsp(fr *types.Frontier, num uint32) (packet *FrontierResponse)

type PublishBlock

type PublishBlock struct {
	Blk *types.StateBlock
}

func PublishBlockFromProto

func PublishBlockFromProto(data []byte) (*PublishBlock, error)

PublishBlockFromProto parse the data into PublishBlock message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL