version

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreSame

func AreSame(h1 *Height, h2 *Height) bool

如果两个高度都为零或相等,则返回“相同”。

Types

type Height

type Height struct {
	BlockNum uint64
	TxNum    uint64
}

Height表示区块链中交易的高度

func NewHeight

func NewHeight(blockNum, txNum uint64) *Height

NewHeight constructs a new instance of Height

func NewHeightFromBytes

func NewHeightFromBytes(b []byte) (*Height, int)

NewHeightFromBytes从序列化字节构造高度的新实例

func (*Height) Compare

func (h *Height) Compare(h1 *Height) int

根据这个高度是否比较A返回1,0,或1。 分别小于、等于或大于指定高度。

func (*Height) ToBytes

func (h *Height) ToBytes() []byte

ToBytes序列化高度

Jump to

Keyboard shortcuts

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