pb

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthSync = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSync   = fmt.Errorf("proto: integer overflow")
)

Functions

This section is empty.

Types

type CheckHash

type CheckHash struct {
	BeginHash []byte `protobuf:"bytes,1,opt,name=begin_hash,json=beginHash,proto3" json:"begin_hash,omitempty"`
	Length    uint32 `protobuf:"varint,2,opt,name=length,proto3" json:"length,omitempty"`
}

func (*CheckHash) Descriptor

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

func (*CheckHash) GetBeginHash

func (m *CheckHash) GetBeginHash() []byte

func (*CheckHash) GetLength

func (m *CheckHash) GetLength() uint32

func (*CheckHash) Marshal

func (m *CheckHash) Marshal() (dAtA []byte, err error)

func (*CheckHash) MarshalTo

func (m *CheckHash) MarshalTo(dAtA []byte) (int, error)

func (*CheckHash) ProtoMessage

func (*CheckHash) ProtoMessage()

func (*CheckHash) Reset

func (m *CheckHash) Reset()

func (*CheckHash) Size

func (m *CheckHash) Size() (n int)

func (*CheckHash) String

func (m *CheckHash) String() string

func (*CheckHash) Unmarshal

func (m *CheckHash) Unmarshal(dAtA []byte) error

func (*CheckHash) XXX_DiscardUnknown

func (m *CheckHash) XXX_DiscardUnknown()

func (*CheckHash) XXX_Marshal

func (m *CheckHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CheckHash) XXX_Merge

func (dst *CheckHash) XXX_Merge(src proto.Message)

func (*CheckHash) XXX_Size

func (m *CheckHash) XXX_Size() int

func (*CheckHash) XXX_Unmarshal

func (m *CheckHash) XXX_Unmarshal(b []byte) error

type FetchBlockHeaders

type FetchBlockHeaders struct {
	Idx       uint32 `protobuf:"varint,1,opt,name=idx,proto3" json:"idx,omitempty"`
	BeginHash []byte `protobuf:"bytes,2,opt,name=begin_hash,json=beginHash,proto3" json:"begin_hash,omitempty"`
	Length    uint32 `protobuf:"varint,3,opt,name=length,proto3" json:"length,omitempty"`
}

func (*FetchBlockHeaders) Descriptor

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

func (*FetchBlockHeaders) GetBeginHash

func (m *FetchBlockHeaders) GetBeginHash() []byte

func (*FetchBlockHeaders) GetIdx

func (m *FetchBlockHeaders) GetIdx() uint32

func (*FetchBlockHeaders) GetLength

func (m *FetchBlockHeaders) GetLength() uint32

func (*FetchBlockHeaders) Marshal

func (m *FetchBlockHeaders) Marshal() (dAtA []byte, err error)

func (*FetchBlockHeaders) MarshalTo

func (m *FetchBlockHeaders) MarshalTo(dAtA []byte) (int, error)

func (*FetchBlockHeaders) ProtoMessage

func (*FetchBlockHeaders) ProtoMessage()

func (*FetchBlockHeaders) Reset

func (m *FetchBlockHeaders) Reset()

func (*FetchBlockHeaders) Size

func (m *FetchBlockHeaders) Size() (n int)

func (*FetchBlockHeaders) String

func (m *FetchBlockHeaders) String() string

func (*FetchBlockHeaders) Unmarshal

func (m *FetchBlockHeaders) Unmarshal(dAtA []byte) error

func (*FetchBlockHeaders) XXX_DiscardUnknown

func (m *FetchBlockHeaders) XXX_DiscardUnknown()

func (*FetchBlockHeaders) XXX_Marshal

func (m *FetchBlockHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FetchBlockHeaders) XXX_Merge

func (dst *FetchBlockHeaders) XXX_Merge(src proto.Message)

func (*FetchBlockHeaders) XXX_Size

func (m *FetchBlockHeaders) XXX_Size() int

func (*FetchBlockHeaders) XXX_Unmarshal

func (m *FetchBlockHeaders) XXX_Unmarshal(b []byte) error

type LocateHeaders

type LocateHeaders struct {
	// locate hashes, formally it is as follows:
	// n, n-1, ... n-k, n-k-2, n-k-5, n-k-10, ... n-k-(2^m+m-1), ... genesis
	// n is tail height, k is sequence part length, m is distance factor
	// n-k-(2^m+m-1) is the (k+m)th element
	// to ensure the closer blocks get to genesis, the sparser the locator becomes
	Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes" json:"hashes,omitempty"`
}

func (*LocateHeaders) Descriptor

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

func (*LocateHeaders) GetHashes

func (m *LocateHeaders) GetHashes() [][]byte

func (*LocateHeaders) Marshal

func (m *LocateHeaders) Marshal() (dAtA []byte, err error)

func (*LocateHeaders) MarshalTo

func (m *LocateHeaders) MarshalTo(dAtA []byte) (int, error)

func (*LocateHeaders) ProtoMessage

func (*LocateHeaders) ProtoMessage()

func (*LocateHeaders) Reset

func (m *LocateHeaders) Reset()

func (*LocateHeaders) Size

func (m *LocateHeaders) Size() (n int)

func (*LocateHeaders) String

func (m *LocateHeaders) String() string

func (*LocateHeaders) Unmarshal

func (m *LocateHeaders) Unmarshal(dAtA []byte) error

func (*LocateHeaders) XXX_DiscardUnknown

func (m *LocateHeaders) XXX_DiscardUnknown()

func (*LocateHeaders) XXX_Marshal

func (m *LocateHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LocateHeaders) XXX_Merge

func (dst *LocateHeaders) XXX_Merge(src proto.Message)

func (*LocateHeaders) XXX_Size

func (m *LocateHeaders) XXX_Size() int

func (*LocateHeaders) XXX_Unmarshal

func (m *LocateHeaders) XXX_Unmarshal(b []byte) error

type SyncBlocks

type SyncBlocks struct {
	Idx    uint32      `protobuf:"varint,1,opt,name=idx,proto3" json:"idx,omitempty"`
	Blocks []*pb.Block `protobuf:"bytes,2,rep,name=blocks" json:"blocks,omitempty"`
}

func (*SyncBlocks) Descriptor

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

func (*SyncBlocks) GetBlocks

func (m *SyncBlocks) GetBlocks() []*pb.Block

func (*SyncBlocks) GetIdx

func (m *SyncBlocks) GetIdx() uint32

func (*SyncBlocks) Marshal

func (m *SyncBlocks) Marshal() (dAtA []byte, err error)

func (*SyncBlocks) MarshalTo

func (m *SyncBlocks) MarshalTo(dAtA []byte) (int, error)

func (*SyncBlocks) ProtoMessage

func (*SyncBlocks) ProtoMessage()

func (*SyncBlocks) Reset

func (m *SyncBlocks) Reset()

func (*SyncBlocks) Size

func (m *SyncBlocks) Size() (n int)

func (*SyncBlocks) String

func (m *SyncBlocks) String() string

func (*SyncBlocks) Unmarshal

func (m *SyncBlocks) Unmarshal(dAtA []byte) error

func (*SyncBlocks) XXX_DiscardUnknown

func (m *SyncBlocks) XXX_DiscardUnknown()

func (*SyncBlocks) XXX_Marshal

func (m *SyncBlocks) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SyncBlocks) XXX_Merge

func (dst *SyncBlocks) XXX_Merge(src proto.Message)

func (*SyncBlocks) XXX_Size

func (m *SyncBlocks) XXX_Size() int

func (*SyncBlocks) XXX_Unmarshal

func (m *SyncBlocks) XXX_Unmarshal(b []byte) error

type SyncCheckHash

type SyncCheckHash struct {
	// it is a root hash for headers between start header and end header
	RootHash []byte `protobuf:"bytes,1,opt,name=root_hash,json=rootHash,proto3" json:"root_hash,omitempty"`
}

func (*SyncCheckHash) Descriptor

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

func (*SyncCheckHash) GetRootHash

func (m *SyncCheckHash) GetRootHash() []byte

func (*SyncCheckHash) Marshal

func (m *SyncCheckHash) Marshal() (dAtA []byte, err error)

func (*SyncCheckHash) MarshalTo

func (m *SyncCheckHash) MarshalTo(dAtA []byte) (int, error)

func (*SyncCheckHash) ProtoMessage

func (*SyncCheckHash) ProtoMessage()

func (*SyncCheckHash) Reset

func (m *SyncCheckHash) Reset()

func (*SyncCheckHash) Size

func (m *SyncCheckHash) Size() (n int)

func (*SyncCheckHash) String

func (m *SyncCheckHash) String() string

func (*SyncCheckHash) Unmarshal

func (m *SyncCheckHash) Unmarshal(dAtA []byte) error

func (*SyncCheckHash) XXX_DiscardUnknown

func (m *SyncCheckHash) XXX_DiscardUnknown()

func (*SyncCheckHash) XXX_Marshal

func (m *SyncCheckHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SyncCheckHash) XXX_Merge

func (dst *SyncCheckHash) XXX_Merge(src proto.Message)

func (*SyncCheckHash) XXX_Size

func (m *SyncCheckHash) XXX_Size() int

func (*SyncCheckHash) XXX_Unmarshal

func (m *SyncCheckHash) XXX_Unmarshal(b []byte) error

type SyncHeaders

type SyncHeaders struct {
	Hashes [][]byte `protobuf:"bytes,1,rep,name=hashes" json:"hashes,omitempty"`
}

func (*SyncHeaders) Descriptor

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

func (*SyncHeaders) GetHashes

func (m *SyncHeaders) GetHashes() [][]byte

func (*SyncHeaders) Marshal

func (m *SyncHeaders) Marshal() (dAtA []byte, err error)

func (*SyncHeaders) MarshalTo

func (m *SyncHeaders) MarshalTo(dAtA []byte) (int, error)

func (*SyncHeaders) ProtoMessage

func (*SyncHeaders) ProtoMessage()

func (*SyncHeaders) Reset

func (m *SyncHeaders) Reset()

func (*SyncHeaders) Size

func (m *SyncHeaders) Size() (n int)

func (*SyncHeaders) String

func (m *SyncHeaders) String() string

func (*SyncHeaders) Unmarshal

func (m *SyncHeaders) Unmarshal(dAtA []byte) error

func (*SyncHeaders) XXX_DiscardUnknown

func (m *SyncHeaders) XXX_DiscardUnknown()

func (*SyncHeaders) XXX_Marshal

func (m *SyncHeaders) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SyncHeaders) XXX_Merge

func (dst *SyncHeaders) XXX_Merge(src proto.Message)

func (*SyncHeaders) XXX_Size

func (m *SyncHeaders) XXX_Size() int

func (*SyncHeaders) XXX_Unmarshal

func (m *SyncHeaders) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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