util

package
v0.0.0-...-73452e5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: GPL-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Types

type TxValidationFlags

type TxValidationFlags []uint8

TxValidationFlags is array of transaction validation codes. It is used when commiter 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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