fabric: github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/version Index | Files

package version

import "github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/version"

Index

Package Files

version.go

func AreSame Uses

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

AreSame returns true if both the heights are either nil or equal

type Height Uses

type Height struct {
    BlockNum uint64
    TxNum    uint64
}

Height represents the height of a transaction in blockchain

func NewHeight Uses

func NewHeight(blockNum, txNum uint64) *Height

NewHeight constructs a new instance of Height

func NewHeightFromBytes Uses

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

NewHeightFromBytes constructs a new instance of Height from serialized bytes

func (*Height) Compare Uses

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

Compare return a -1, zero, or +1 based on whether this height is less than, equals to, or greater than the specified height respectively.

func (*Height) String Uses

func (h *Height) String() string

String returns string for printing

func (*Height) ToBytes Uses

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

ToBytes serializes the Height

Package version imports 2 packages (graph) and is imported by 18 packages. Updated 2019-07-12. Refresh now. Tools for package owners.