pb

package
v3.9.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlockType_name = map[int32]string{
		0: "NORMAL",
		1: "ONLYHASH",
	}
	BlockType_value = map[string]int32{
		"NORMAL":   0,
		"ONLYHASH": 1,
	}
)

Enum value maps for BlockType.

View Source
var File_core_block_pb_block_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Block

type Block struct {
	Head          *BlockHead       `protobuf:"bytes,1,opt,name=head,proto3" json:"head,omitempty"`
	Sign          *pb.Signature    `protobuf:"bytes,2,opt,name=sign,proto3" json:"sign,omitempty"`
	Txs           []*pb1.Tx        `protobuf:"bytes,3,rep,name=txs,proto3" json:"txs,omitempty"`
	Receipts      []*pb1.TxReceipt `protobuf:"bytes,4,rep,name=receipts,proto3" json:"receipts,omitempty"`
	TxHashes      [][]byte         `protobuf:"bytes,5,rep,name=txHashes,proto3" json:"txHashes,omitempty"`
	ReceiptHashes [][]byte         `protobuf:"bytes,6,rep,name=receiptHashes,proto3" json:"receiptHashes,omitempty"`
	BlockType     BlockType        `protobuf:"varint,7,opt,name=blockType,proto3,enum=blockpb.BlockType" json:"blockType,omitempty"`
	// contains filtered or unexported fields
}

func (*Block) Descriptor deprecated

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

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetBlockType

func (x *Block) GetBlockType() BlockType

func (*Block) GetHead

func (x *Block) GetHead() *BlockHead

func (*Block) GetReceiptHashes

func (x *Block) GetReceiptHashes() [][]byte

func (*Block) GetReceipts

func (x *Block) GetReceipts() []*pb1.TxReceipt

func (*Block) GetSign

func (x *Block) GetSign() *pb.Signature

func (*Block) GetTxHashes

func (x *Block) GetTxHashes() [][]byte

func (*Block) GetTxs

func (x *Block) GetTxs() []*pb1.Tx

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

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

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type BlockHead

type BlockHead struct {
	Version             int64  `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	ParentHash          []byte `protobuf:"bytes,2,opt,name=parentHash,proto3" json:"parentHash,omitempty"`
	TxMerkleHash        []byte `protobuf:"bytes,3,opt,name=txMerkleHash,proto3" json:"txMerkleHash,omitempty"`
	TxReceiptMerkleHash []byte `protobuf:"bytes,4,opt,name=txReceiptMerkleHash,proto3" json:"txReceiptMerkleHash,omitempty"`
	Info                []byte `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty"`
	Number              int64  `protobuf:"varint,6,opt,name=number,proto3" json:"number,omitempty"`
	Witness             string `protobuf:"bytes,7,opt,name=witness,proto3" json:"witness,omitempty"`
	Time                int64  `protobuf:"varint,8,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockHead) Descriptor deprecated

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

Deprecated: Use BlockHead.ProtoReflect.Descriptor instead.

func (*BlockHead) GetInfo

func (x *BlockHead) GetInfo() []byte

func (*BlockHead) GetNumber

func (x *BlockHead) GetNumber() int64

func (*BlockHead) GetParentHash

func (x *BlockHead) GetParentHash() []byte

func (*BlockHead) GetTime

func (x *BlockHead) GetTime() int64

func (*BlockHead) GetTxMerkleHash

func (x *BlockHead) GetTxMerkleHash() []byte

func (*BlockHead) GetTxReceiptMerkleHash

func (x *BlockHead) GetTxReceiptMerkleHash() []byte

func (*BlockHead) GetVersion

func (x *BlockHead) GetVersion() int64

func (*BlockHead) GetWitness

func (x *BlockHead) GetWitness() string

func (*BlockHead) ProtoMessage

func (*BlockHead) ProtoMessage()

func (*BlockHead) ProtoReflect

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

func (*BlockHead) Reset

func (x *BlockHead) Reset()

func (*BlockHead) String

func (x *BlockHead) String() string

type BlockType

type BlockType int32
const (
	BlockType_NORMAL   BlockType = 0
	BlockType_ONLYHASH BlockType = 1
)

func (BlockType) Descriptor

func (BlockType) Descriptor() protoreflect.EnumDescriptor

func (BlockType) Enum

func (x BlockType) Enum() *BlockType

func (BlockType) EnumDescriptor deprecated

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

Deprecated: Use BlockType.Descriptor instead.

func (BlockType) Number

func (x BlockType) Number() protoreflect.EnumNumber

func (BlockType) String

func (x BlockType) String() string

func (BlockType) Type

Jump to

Keyboard shortcuts

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