sync_proto

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncType_name = map[int32]string{
		0:  "FINDReq",
		1:  "FindRes",
		2:  "HeaderReq",
		3:  "HeaderRes",
		4:  "BodyReq",
		5:  "BodyRes",
		6:  "StateReq",
		7:  "StateRes",
		8:  "TransactionReq",
		9:  "TransactionRes",
		10: "PeerInfoBroadcast",
	}
	SyncType_value = map[string]int32{
		"FINDReq":           0,
		"FindRes":           1,
		"HeaderReq":         2,
		"HeaderRes":         3,
		"BodyReq":           4,
		"BodyRes":           5,
		"StateReq":          6,
		"StateRes":          7,
		"TransactionReq":    8,
		"TransactionRes":    9,
		"PeerInfoBroadcast": 10,
	}
)

Enum value maps for SyncType.

Functions

This section is empty.

Types

type SyncBlockRequest

type SyncBlockRequest struct {
	Number []*types_pb.H256 `protobuf:"bytes,1,rep,name=number,proto3" json:"number,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncBlockRequest) Descriptor deprecated

func (*SyncBlockRequest) Descriptor() ([]byte, []int)

Deprecated: Use SyncBlockRequest.ProtoReflect.Descriptor instead.

func (*SyncBlockRequest) GetNumber

func (x *SyncBlockRequest) GetNumber() []*types_pb.H256

func (*SyncBlockRequest) ProtoMessage

func (*SyncBlockRequest) ProtoMessage()

func (*SyncBlockRequest) ProtoReflect

func (x *SyncBlockRequest) ProtoReflect() protoreflect.Message

func (*SyncBlockRequest) Reset

func (x *SyncBlockRequest) Reset()

func (*SyncBlockRequest) String

func (x *SyncBlockRequest) String() string

type SyncBlockResponse

type SyncBlockResponse struct {
	Blocks []*types_pb.Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncBlockResponse) Descriptor deprecated

func (*SyncBlockResponse) Descriptor() ([]byte, []int)

Deprecated: Use SyncBlockResponse.ProtoReflect.Descriptor instead.

func (*SyncBlockResponse) GetBlocks

func (x *SyncBlockResponse) GetBlocks() []*types_pb.Block

func (*SyncBlockResponse) ProtoMessage

func (*SyncBlockResponse) ProtoMessage()

func (*SyncBlockResponse) ProtoReflect

func (x *SyncBlockResponse) ProtoReflect() protoreflect.Message

func (*SyncBlockResponse) Reset

func (x *SyncBlockResponse) Reset()

func (*SyncBlockResponse) String

func (x *SyncBlockResponse) String() string

type SyncHeaderRequest

type SyncHeaderRequest struct {
	Number *types_pb.H256 `protobuf:"bytes,1,opt,name=number,proto3" json:"number,omitempty"`
	Amount *types_pb.H256 `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncHeaderRequest) Descriptor deprecated

func (*SyncHeaderRequest) Descriptor() ([]byte, []int)

Deprecated: Use SyncHeaderRequest.ProtoReflect.Descriptor instead.

func (*SyncHeaderRequest) GetAmount

func (x *SyncHeaderRequest) GetAmount() *types_pb.H256

func (*SyncHeaderRequest) GetNumber

func (x *SyncHeaderRequest) GetNumber() *types_pb.H256

func (*SyncHeaderRequest) ProtoMessage

func (*SyncHeaderRequest) ProtoMessage()

func (*SyncHeaderRequest) ProtoReflect

func (x *SyncHeaderRequest) ProtoReflect() protoreflect.Message

func (*SyncHeaderRequest) Reset

func (x *SyncHeaderRequest) Reset()

func (*SyncHeaderRequest) String

func (x *SyncHeaderRequest) String() string

type SyncHeaderResponse

type SyncHeaderResponse struct {
	Headers []*types_pb.Header `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncHeaderResponse) Descriptor deprecated

func (*SyncHeaderResponse) Descriptor() ([]byte, []int)

Deprecated: Use SyncHeaderResponse.ProtoReflect.Descriptor instead.

func (*SyncHeaderResponse) GetHeaders

func (x *SyncHeaderResponse) GetHeaders() []*types_pb.Header

func (*SyncHeaderResponse) ProtoMessage

func (*SyncHeaderResponse) ProtoMessage()

func (*SyncHeaderResponse) ProtoReflect

func (x *SyncHeaderResponse) ProtoReflect() protoreflect.Message

func (*SyncHeaderResponse) Reset

func (x *SyncHeaderResponse) Reset()

func (*SyncHeaderResponse) String

func (x *SyncHeaderResponse) String() string

type SyncPeerInfoBroadcast

type SyncPeerInfoBroadcast struct {
	Difficulty *types_pb.H256 `protobuf:"bytes,1,opt,name=Difficulty,proto3" json:"Difficulty,omitempty"`
	Number     *types_pb.H256 `protobuf:"bytes,2,opt,name=Number,proto3" json:"Number,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncPeerInfoBroadcast) Descriptor deprecated

func (*SyncPeerInfoBroadcast) Descriptor() ([]byte, []int)

Deprecated: Use SyncPeerInfoBroadcast.ProtoReflect.Descriptor instead.

func (*SyncPeerInfoBroadcast) GetDifficulty

func (x *SyncPeerInfoBroadcast) GetDifficulty() *types_pb.H256

func (*SyncPeerInfoBroadcast) GetNumber

func (x *SyncPeerInfoBroadcast) GetNumber() *types_pb.H256

func (*SyncPeerInfoBroadcast) ProtoMessage

func (*SyncPeerInfoBroadcast) ProtoMessage()

func (*SyncPeerInfoBroadcast) ProtoReflect

func (x *SyncPeerInfoBroadcast) ProtoReflect() protoreflect.Message

func (*SyncPeerInfoBroadcast) Reset

func (x *SyncPeerInfoBroadcast) Reset()

func (*SyncPeerInfoBroadcast) String

func (x *SyncPeerInfoBroadcast) String() string

type SyncProtocol

type SyncProtocol struct {
	// contains filtered or unexported fields
}

func (*SyncProtocol) Descriptor deprecated

func (*SyncProtocol) Descriptor() ([]byte, []int)

Deprecated: Use SyncProtocol.ProtoReflect.Descriptor instead.

func (*SyncProtocol) ProtoMessage

func (*SyncProtocol) ProtoMessage()

func (*SyncProtocol) ProtoReflect

func (x *SyncProtocol) ProtoReflect() protoreflect.Message

func (*SyncProtocol) Reset

func (x *SyncProtocol) Reset()

func (*SyncProtocol) String

func (x *SyncProtocol) String() string

type SyncTask

type SyncTask struct {
	Id       uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // task id
	Ok       bool     `protobuf:"varint,2,opt,name=ok,proto3" json:"ok,omitempty"`
	SyncType SyncType `protobuf:"varint,3,opt,name=syncType,proto3,enum=sync_proto.SyncType" json:"syncType,omitempty"`
	// Types that are assignable to Payload:
	//	*SyncTask_SyncHeaderRequest
	//	*SyncTask_SyncHeaderResponse
	//	*SyncTask_SyncBlockRequest
	//	*SyncTask_SyncBlockResponse
	//	*SyncTask_SyncTransactionRequest
	//	*SyncTask_SyncTransactionResponse
	//	*SyncTask_SyncPeerInfoBroadcast
	Payload isSyncTask_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*SyncTask) Descriptor deprecated

func (*SyncTask) Descriptor() ([]byte, []int)

Deprecated: Use SyncTask.ProtoReflect.Descriptor instead.

func (*SyncTask) GetId

func (x *SyncTask) GetId() uint64

func (*SyncTask) GetOk

func (x *SyncTask) GetOk() bool

func (*SyncTask) GetPayload

func (m *SyncTask) GetPayload() isSyncTask_Payload

func (*SyncTask) GetSyncBlockRequest

func (x *SyncTask) GetSyncBlockRequest() *SyncBlockRequest

func (*SyncTask) GetSyncBlockResponse

func (x *SyncTask) GetSyncBlockResponse() *SyncBlockResponse

func (*SyncTask) GetSyncHeaderRequest

func (x *SyncTask) GetSyncHeaderRequest() *SyncHeaderRequest

func (*SyncTask) GetSyncHeaderResponse

func (x *SyncTask) GetSyncHeaderResponse() *SyncHeaderResponse

func (*SyncTask) GetSyncPeerInfoBroadcast

func (x *SyncTask) GetSyncPeerInfoBroadcast() *SyncPeerInfoBroadcast

func (*SyncTask) GetSyncTransactionRequest

func (x *SyncTask) GetSyncTransactionRequest() *SyncTransactionRequest

func (*SyncTask) GetSyncTransactionResponse

func (x *SyncTask) GetSyncTransactionResponse() *SyncTransactionResponse

func (*SyncTask) GetSyncType

func (x *SyncTask) GetSyncType() SyncType

func (*SyncTask) ProtoMessage

func (*SyncTask) ProtoMessage()

func (*SyncTask) ProtoReflect

func (x *SyncTask) ProtoReflect() protoreflect.Message

func (*SyncTask) Reset

func (x *SyncTask) Reset()

func (*SyncTask) String

func (x *SyncTask) String() string

type SyncTask_SyncBlockRequest

type SyncTask_SyncBlockRequest struct {
	//body
	SyncBlockRequest *SyncBlockRequest `protobuf:"bytes,6,opt,name=syncBlockRequest,proto3,oneof"`
}

type SyncTask_SyncBlockResponse

type SyncTask_SyncBlockResponse struct {
	SyncBlockResponse *SyncBlockResponse `protobuf:"bytes,7,opt,name=syncBlockResponse,proto3,oneof"`
}

type SyncTask_SyncHeaderRequest

type SyncTask_SyncHeaderRequest struct {
	//header
	SyncHeaderRequest *SyncHeaderRequest `protobuf:"bytes,4,opt,name=syncHeaderRequest,proto3,oneof"`
}

type SyncTask_SyncHeaderResponse

type SyncTask_SyncHeaderResponse struct {
	SyncHeaderResponse *SyncHeaderResponse `protobuf:"bytes,5,opt,name=syncHeaderResponse,proto3,oneof"`
}

type SyncTask_SyncPeerInfoBroadcast

type SyncTask_SyncPeerInfoBroadcast struct {
	//
	SyncPeerInfoBroadcast *SyncPeerInfoBroadcast `protobuf:"bytes,10,opt,name=syncPeerInfoBroadcast,proto3,oneof"`
}

type SyncTask_SyncTransactionRequest

type SyncTask_SyncTransactionRequest struct {
	//Transaction
	SyncTransactionRequest *SyncTransactionRequest `protobuf:"bytes,8,opt,name=syncTransactionRequest,proto3,oneof"`
}

type SyncTask_SyncTransactionResponse

type SyncTask_SyncTransactionResponse struct {
	SyncTransactionResponse *SyncTransactionResponse `protobuf:"bytes,9,opt,name=syncTransactionResponse,proto3,oneof"`
}

type SyncTransactionRequest

type SyncTransactionRequest struct {
	Bloom []byte `protobuf:"bytes,1,opt,name=bloom,proto3" json:"bloom,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncTransactionRequest) Descriptor deprecated

func (*SyncTransactionRequest) Descriptor() ([]byte, []int)

Deprecated: Use SyncTransactionRequest.ProtoReflect.Descriptor instead.

func (*SyncTransactionRequest) GetBloom

func (x *SyncTransactionRequest) GetBloom() []byte

func (*SyncTransactionRequest) ProtoMessage

func (*SyncTransactionRequest) ProtoMessage()

func (*SyncTransactionRequest) ProtoReflect

func (x *SyncTransactionRequest) ProtoReflect() protoreflect.Message

func (*SyncTransactionRequest) Reset

func (x *SyncTransactionRequest) Reset()

func (*SyncTransactionRequest) String

func (x *SyncTransactionRequest) String() string

type SyncTransactionResponse

type SyncTransactionResponse struct {
	Transactions []*types_pb.Transaction `protobuf:"bytes,1,rep,name=transactions,proto3" json:"transactions,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncTransactionResponse) Descriptor deprecated

func (*SyncTransactionResponse) Descriptor() ([]byte, []int)

Deprecated: Use SyncTransactionResponse.ProtoReflect.Descriptor instead.

func (*SyncTransactionResponse) GetTransactions

func (x *SyncTransactionResponse) GetTransactions() []*types_pb.Transaction

func (*SyncTransactionResponse) ProtoMessage

func (*SyncTransactionResponse) ProtoMessage()

func (*SyncTransactionResponse) ProtoReflect

func (x *SyncTransactionResponse) ProtoReflect() protoreflect.Message

func (*SyncTransactionResponse) Reset

func (x *SyncTransactionResponse) Reset()

func (*SyncTransactionResponse) String

func (x *SyncTransactionResponse) String() string

type SyncType

type SyncType int32
const (
	SyncType_FINDReq           SyncType = 0
	SyncType_FindRes           SyncType = 1
	SyncType_HeaderReq         SyncType = 2
	SyncType_HeaderRes         SyncType = 3
	SyncType_BodyReq           SyncType = 4
	SyncType_BodyRes           SyncType = 5
	SyncType_StateReq          SyncType = 6
	SyncType_StateRes          SyncType = 7
	SyncType_TransactionReq    SyncType = 8
	SyncType_TransactionRes    SyncType = 9
	SyncType_PeerInfoBroadcast SyncType = 10
)

func (SyncType) Descriptor

func (SyncType) Descriptor() protoreflect.EnumDescriptor

func (SyncType) Enum

func (x SyncType) Enum() *SyncType

func (SyncType) EnumDescriptor deprecated

func (SyncType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SyncType.Descriptor instead.

func (SyncType) Number

func (x SyncType) Number() protoreflect.EnumNumber

func (SyncType) String

func (x SyncType) String() string

func (SyncType) Type

type Value

type Value struct {
	Hash   string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*Value) Descriptor deprecated

func (*Value) Descriptor() ([]byte, []int)

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetHash

func (x *Value) GetHash() string

func (*Value) GetHeight

func (x *Value) GetHeight() uint64

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

Jump to

Keyboard shortcuts

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