hornet

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HORNET_TX_METADATA_SOLID     = 0
	HORNET_TX_METADATA_CONFIRMED = 1
	HORNET_TX_METADATA_REQUESTED = 2
)

Variables

This section is empty.

Functions

func ContainsKeyTrinaryHashMilestoneIndex

func ContainsKeyTrinaryHashMilestoneIndex(m map[trinary.Hash]milestone_index.MilestoneIndex, k trinary.Hash) bool

func ContainsKeyTrinaryHashTransaction

func ContainsKeyTrinaryHashTransaction(m map[trinary.Hash]*Transaction, k trinary.Hash) bool

func ContainsValueTrinaryHashTransaction

func ContainsValueTrinaryHashTransaction(m map[trinary.Hash]*Transaction, v *Transaction) bool

func CopyTrinaryHashTransaction

func CopyTrinaryHashTransaction(m map[trinary.Hash]*Transaction) map[trinary.Hash]*Transaction

func GetKeysTrinaryHashMilestoneIndex

func GetKeysTrinaryHashMilestoneIndex(m map[trinary.Hash]milestone_index.MilestoneIndex) []trinary.Hash

func GetKeysTrinaryHashTransaction

func GetKeysTrinaryHashTransaction(m map[trinary.Hash]*Transaction) []trinary.Hash

func NewTransactionCaller

func NewTransactionCaller(handler interface{}, params ...interface{})

func TransactionCaller

func TransactionCaller(handler interface{}, params ...interface{})

func TransactionConfirmedCaller

func TransactionConfirmedCaller(handler interface{}, params ...interface{})

Types

type SolidEntryPoints

type SolidEntryPoints struct {
	// contains filtered or unexported fields
}

func NewSolidEntryPoints

func NewSolidEntryPoints() *SolidEntryPoints

func SolidEntryPointsFromBytes

func SolidEntryPointsFromBytes(solidEntryPointsBytes []byte) (*SolidEntryPoints, error)

func (*SolidEntryPoints) Add

func (s *SolidEntryPoints) Add(transactionHash trinary.Hash, milestoneIndex milestone_index.MilestoneIndex)

func (*SolidEntryPoints) Clear

func (s *SolidEntryPoints) Clear()

func (*SolidEntryPoints) Contains

func (s *SolidEntryPoints) Contains(transactionHash trinary.Hash) bool

func (*SolidEntryPoints) GetBytes

func (s *SolidEntryPoints) GetBytes() []byte

func (*SolidEntryPoints) Hashes

func (s *SolidEntryPoints) Hashes() []trinary.Hash

func (*SolidEntryPoints) IsModified

func (s *SolidEntryPoints) IsModified() bool

func (*SolidEntryPoints) SetModified

func (s *SolidEntryPoints) SetModified(modified bool)

type Transaction

type Transaction struct {
	// Decompressed iota.go Transaction containing Hash
	Tx *transaction.Transaction

	// Compressed bytes as received from IRI
	RawBytes []byte
	// contains filtered or unexported fields
}

func GetValuesTrinaryHashTransaction

func GetValuesTrinaryHashTransaction(m map[trinary.Hash]*Transaction) []*Transaction

func NewTransactionFromAPI

func NewTransactionFromAPI(transaction *transaction.Transaction, transactionBytes []byte) *Transaction

func NewTransactionFromDatabase

func NewTransactionFromDatabase(transaction *transaction.Transaction, transactionBytes []byte, solidificationTimestamp int32, confirmationIndex milestone_index.MilestoneIndex, metadata byte) *Transaction

func NewTransactionFromGossip

func NewTransactionFromGossip(transaction *transaction.Transaction, transactionBytes []byte, requested bool) *Transaction

func (*Transaction) GetBranch

func (tx *Transaction) GetBranch() trinary.Hash

func (*Transaction) GetConfirmed

func (tx *Transaction) GetConfirmed() (bool, milestone_index.MilestoneIndex)

func (*Transaction) GetHash

func (tx *Transaction) GetHash() trinary.Hash

func (*Transaction) GetMetadata

func (tx *Transaction) GetMetadata() byte

func (*Transaction) GetSolidificationTimestamp added in v0.2.0

func (tx *Transaction) GetSolidificationTimestamp() int32

func (*Transaction) GetTimestamp

func (tx *Transaction) GetTimestamp() int64

func (*Transaction) GetTrunk

func (tx *Transaction) GetTrunk() trinary.Hash

func (*Transaction) IsHead

func (tx *Transaction) IsHead() bool

func (*Transaction) IsModified

func (tx *Transaction) IsModified() bool

func (*Transaction) IsRequested

func (tx *Transaction) IsRequested() bool

func (*Transaction) IsSolid

func (tx *Transaction) IsSolid() bool

func (*Transaction) IsTail

func (tx *Transaction) IsTail() bool

func (*Transaction) SetConfirmed

func (tx *Transaction) SetConfirmed(confirmed bool, confirmationIndex milestone_index.MilestoneIndex)

func (*Transaction) SetModified

func (tx *Transaction) SetModified(modified bool)

func (*Transaction) SetRequested

func (tx *Transaction) SetRequested(requested bool)

func (*Transaction) SetSolid

func (tx *Transaction) SetSolid(solid bool)

Jump to

Keyboard shortcuts

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