gencode

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeAccountBlock

func DeserializeAccountBlock(bs []byte) (*common.AccountStateBlock, error)

func DeserializeAccountHashH

func DeserializeAccountHashH(byt []byte) (*common.AccountHashH, error)

func DeserializeHashHeight

func DeserializeHashHeight(byt []byte) (*common.HashHeight, error)

func DeserializeSnapshotBlock

func DeserializeSnapshotBlock(bs []byte) (*common.SnapshotBlock, error)

func SerializeAccountBlock

func SerializeAccountBlock(block *common.AccountStateBlock) ([]byte, error)

func SerializeAccountHashH

func SerializeAccountHashH(accountH *common.AccountHashH) ([]byte, error)

func SerializeHashHeight

func SerializeHashHeight(hashHeight *common.HashHeight) ([]byte, error)

func SerializeSnapshotBlock

func SerializeSnapshotBlock(block *common.SnapshotBlock) ([]byte, error)

Types

type AccountHashH

type AccountHashH struct {
	Hash   string
	Height uint64
	Addr   string
}

func (*AccountHashH) Marshal

func (d *AccountHashH) Marshal(buf []byte) ([]byte, error)

func (*AccountHashH) Size

func (d *AccountHashH) Size() (s uint64)

func (*AccountHashH) Unmarshal

func (d *AccountHashH) Unmarshal(buf []byte) (uint64, error)

type DBAccountBlock

type DBAccountBlock struct {
	Height         uint64
	Hash           string
	PreHash        string
	Signer         string
	Timestamp      int64
	Amount         int64
	ModifiedAmount int64
	SnapshotHeight uint64
	SnapshotHash   string
	BlockType      uint8
	From           string
	To             string
	Source         *HashHeight
}

func (*DBAccountBlock) Marshal

func (d *DBAccountBlock) Marshal(buf []byte) ([]byte, error)

func (*DBAccountBlock) Size

func (d *DBAccountBlock) Size() (s uint64)

func (*DBAccountBlock) Unmarshal

func (d *DBAccountBlock) Unmarshal(buf []byte) (uint64, error)

type DBSnapshotBlock

type DBSnapshotBlock struct {
	Height    uint64
	Hash      string
	PreHash   string
	Signer    string
	Timestamp int64
	Accounts  []*AccountHashH
}

func (*DBSnapshotBlock) Marshal

func (d *DBSnapshotBlock) Marshal(buf []byte) ([]byte, error)

func (*DBSnapshotBlock) Size

func (d *DBSnapshotBlock) Size() (s uint64)

func (*DBSnapshotBlock) Unmarshal

func (d *DBSnapshotBlock) Unmarshal(buf []byte) (uint64, error)

type HashHeight

type HashHeight struct {
	Hash   string
	Height uint64
}

func (*HashHeight) Marshal

func (d *HashHeight) Marshal(buf []byte) ([]byte, error)

func (*HashHeight) Size

func (d *HashHeight) Size() (s uint64)

func (*HashHeight) Unmarshal

func (d *HashHeight) Unmarshal(buf []byte) (uint64, error)

Jump to

Keyboard shortcuts

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