fabric: github.com/hyperledger/fabric/core/ledger/util Index | Files | Directories

package util

import "github.com/hyperledger/fabric/core/ledger/util"

Index

Package Files

txvalidationflags.go uint64_encoding.go util.go

func ComputeHash Uses

func ComputeHash(input []byte) []byte

ComputeHash computes the hash of the given bytes

func ComputeStringHash Uses

func ComputeStringHash(input string) []byte

ComputeStringHash computes the hash of the given string

func DecodeReverseOrderVarUint64 Uses

func DecodeReverseOrderVarUint64(bytes []byte) (uint64, int)

DecodeReverseOrderVarUint64 decodes the number from the bytes obtained from function 'EncodeReverseOrderVarUint64'. Also, returns the number of bytes that are consumed in the process

func EncodeReverseOrderVarUint64 Uses

func EncodeReverseOrderVarUint64(number uint64) []byte

EncodeReverseOrderVarUint64 returns a byte-representation for a uint64 number such that the number is first subtracted from MaxUint64 and then all the leading 0xff bytes are trimmed and replaced by the number of such trimmed bytes. This helps in reducing the size. In the byte order comparison this encoding ensures that EncodeReverseOrderVarUint64(A) > EncodeReverseOrderVarUint64(B), If B > A

func GetSortedKeys Uses

func GetSortedKeys(m interface{}) []string

GetSortedKeys returns the keys of the map in a sorted order. This function assumes that the keys are string

func GetValuesBySortedKeys Uses

func GetValuesBySortedKeys(mapPtr interface{}, listPtr interface{})

GetValuesBySortedKeys returns the values of the map (mapPtr) in the list (listPtr) in the sorted order of key of the map This function assumes that the mapPtr is a pointer to a map and listPtr is is a pointer to a list. Further type of keys of the map are assumed to be string and the types of the values of the maps and the list are same

type TxValidationFlags Uses

type TxValidationFlags []uint8

TxValidationFlags is array of transaction validation codes. It is used when committer validates block.

func NewTxValidationFlags Uses

func NewTxValidationFlags(size int) TxValidationFlags

NewTxValidationFlags Create new object-array of validation codes with target size. Default values: TxValidationCode_NOT_VALIDATED

func NewTxValidationFlagsSetValue Uses

func NewTxValidationFlagsSetValue(size int, value peer.TxValidationCode) TxValidationFlags

NewTxValidationFlagsSetValue Creates new object-array of validation codes with target size and the supplied value

func (TxValidationFlags) Flag Uses

func (obj TxValidationFlags) Flag(txIndex int) peer.TxValidationCode

Flag returns validation code at specified transaction

func (TxValidationFlags) IsInvalid Uses

func (obj TxValidationFlags) IsInvalid(txIndex int) bool

IsInvalid checks if specified transaction is invalid

func (TxValidationFlags) IsSetTo Uses

func (obj TxValidationFlags) IsSetTo(txIndex int, flag peer.TxValidationCode) bool

IsSetTo returns true if the specified transaction equals flag; false otherwise.

func (TxValidationFlags) IsValid Uses

func (obj TxValidationFlags) IsValid(txIndex int) bool

IsValid checks if specified transaction is valid

func (TxValidationFlags) SetFlag Uses

func (obj TxValidationFlags) SetFlag(txIndex int, flag peer.TxValidationCode)

SetFlag assigns validation code to specified transaction

Directories

PathSynopsis
couchdb

Package util imports 7 packages (graph) and is imported by 56 packages. Updated 2019-03-21. Refresh now. Tools for package owners.