batch

package
v1.999.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 9 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBatch        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBatch          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBatch = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Data       [][]byte `protobuf:"bytes,1,rep,name=Data,proto3" json:"data"`
	Reference  []byte   `protobuf:"bytes,2,opt,name=Reference,proto3" json:"reference"`
	ChunkIndex uint32   `protobuf:"varint,3,opt,name=ChunkIndex,proto3" json:"chunkIndex"`
	MaxChunks  uint32   `protobuf:"varint,4,opt,name=MaxChunks,proto3" json:"maxChunks"`
}

Transaction holds all the data needed for a value transfer or SC call

func New

func New(buffs ...[]byte) *Batch

New returns a new batch from given buffers

func NewChunk

func NewChunk(chunkIndex uint32, reference []byte, maxChunks uint32, buffs ...[]byte) *Batch

NewChunk returns a new batch containing a chunk from given buffers

func (*Batch) Descriptor

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

func (*Batch) Equal

func (this *Batch) Equal(that interface{}) bool

func (*Batch) GetChunkIndex

func (m *Batch) GetChunkIndex() uint32

func (*Batch) GetData

func (m *Batch) GetData() [][]byte

func (*Batch) GetMaxChunks

func (m *Batch) GetMaxChunks() uint32

func (*Batch) GetReference

func (m *Batch) GetReference() []byte

func (*Batch) GoString

func (this *Batch) GoString() string

func (*Batch) Marshal

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

func (*Batch) MarshalTo

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

func (*Batch) MarshalToSizedBuffer

func (m *Batch) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Batch) ProtoMessage

func (*Batch) ProtoMessage()

func (*Batch) Reset

func (m *Batch) Reset()

func (*Batch) Size

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

func (*Batch) String

func (this *Batch) String() string

func (*Batch) Unmarshal

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

func (*Batch) XXX_DiscardUnknown

func (m *Batch) XXX_DiscardUnknown()

func (*Batch) XXX_Marshal

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

func (*Batch) XXX_Merge

func (m *Batch) XXX_Merge(src proto.Message)

func (*Batch) XXX_Size

func (m *Batch) XXX_Size() int

func (*Batch) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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