Documentation ¶
Index ¶
- func ComputeHash(input []byte) []byte
- func ComputeStringHash(input string) []byte
- func GetSortedKeys(m interface{}) []string
- func GetValuesBySortedKeys(mapPtr interface{}, listPtr interface{})
- type TxValidationFlags
- func (obj TxValidationFlags) Flag(txIndex int) peer.TxValidationCode
- func (obj TxValidationFlags) IsInvalid(txIndex int) bool
- func (obj TxValidationFlags) IsSetTo(txIndex int, flag peer.TxValidationCode) bool
- func (obj TxValidationFlags) IsValid(txIndex int) bool
- func (obj TxValidationFlags) SetFlag(txIndex int, flag peer.TxValidationCode)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeHash ¶ added in v1.1.1
ComputeHash computes the hash of the given bytes
func ComputeStringHash ¶ added in v1.1.1
ComputeStringHash computes the hash of the given string
func GetSortedKeys ¶
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 ¶ added in v1.1.1
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
Types ¶
type TxValidationFlags ¶
type TxValidationFlags []uint8
TxValidationFlags is array of transaction validation codes. It is used when committer validates block.
func NewTxValidationFlags ¶
func NewTxValidationFlags(size int) TxValidationFlags
NewTxValidationFlags Create new object-array of validation codes with target size. Default values: valid.
func (TxValidationFlags) Flag ¶
func (obj TxValidationFlags) Flag(txIndex int) peer.TxValidationCode
Flag returns validation code at specified transaction
func (TxValidationFlags) IsInvalid ¶
func (obj TxValidationFlags) IsInvalid(txIndex int) bool
IsInvalid checks if specified transaction is invalid
func (TxValidationFlags) IsSetTo ¶
func (obj TxValidationFlags) IsSetTo(txIndex int, flag peer.TxValidationCode) bool
IsSetTo returns true if the specified transaction equals flag; false otherwise.
func (TxValidationFlags) IsValid ¶
func (obj TxValidationFlags) IsValid(txIndex int) bool
IsValid checks if specified transaction is valid
func (TxValidationFlags) SetFlag ¶
func (obj TxValidationFlags) SetFlag(txIndex int, flag peer.TxValidationCode)
SetFlag assigns validation code to specified transaction