hornet

package
v0.4.0-rc11 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionMetadataSolid     = 0
	TransactionMetadataConfirmed = 1
)
View Source
const (
	AddressTxIsValue = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	objectstorage.StorableObjectFlags
	Address []byte
	IsValue bool
	TxHash  []byte
}

func (*Address) GetAddress

func (a *Address) GetAddress() trinary.Hash

func (*Address) GetTransactionHash

func (a *Address) GetTransactionHash() trinary.Hash

func (*Address) ObjectStorageKey

func (a *Address) ObjectStorageKey() []byte

func (*Address) ObjectStorageValue

func (a *Address) ObjectStorageValue() (_ []byte)

func (*Address) UnmarshalObjectStorageValue

func (a *Address) UnmarshalObjectStorageValue(_ []byte) (consumedBytes int, err error)

func (*Address) Update

func (a *Address) Update(_ objectstorage.StorableObject)

type Approver

type Approver struct {
	objectstorage.StorableObjectFlags
	TxHash       []byte
	ApproverHash []byte
}

func (*Approver) GetApproverHash

func (a *Approver) GetApproverHash() trinary.Hash

func (*Approver) GetTransactionHash

func (a *Approver) GetTransactionHash() trinary.Hash

func (*Approver) ObjectStorageKey

func (a *Approver) ObjectStorageKey() []byte

func (*Approver) ObjectStorageValue

func (a *Approver) ObjectStorageValue() (_ []byte)

func (*Approver) UnmarshalObjectStorageValue

func (a *Approver) UnmarshalObjectStorageValue(_ []byte) (consumedBytes int, err error)

func (*Approver) Update

func (a *Approver) Update(_ objectstorage.StorableObject)

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)

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 SpentAddress

type SpentAddress struct {
	objectstorage.StorableObjectFlags

	Address []byte
}

func (*SpentAddress) GetAddress

func (sa *SpentAddress) GetAddress() trinary.Hash

func (*SpentAddress) ObjectStorageKey

func (sa *SpentAddress) ObjectStorageKey() []byte

func (*SpentAddress) ObjectStorageValue

func (sa *SpentAddress) ObjectStorageValue() (_ []byte)

func (*SpentAddress) UnmarshalObjectStorageValue

func (sa *SpentAddress) UnmarshalObjectStorageValue(_ []byte) (consumedBytes int, err error)

func (*SpentAddress) Update

type Tag

type Tag struct {
	objectstorage.StorableObjectFlags
	Tag    []byte
	TxHash []byte
}

func (*Tag) GetTag

func (t *Tag) GetTag() trinary.Hash

func (*Tag) GetTransactionHash

func (t *Tag) GetTransactionHash() trinary.Hash

func (*Tag) ObjectStorageKey

func (t *Tag) ObjectStorageKey() []byte

func (*Tag) ObjectStorageValue

func (t *Tag) ObjectStorageValue() (_ []byte)

func (*Tag) UnmarshalObjectStorageValue

func (t *Tag) UnmarshalObjectStorageValue(_ []byte) (consumedBytes int, err error)

func (*Tag) Update

func (t *Tag) Update(_ objectstorage.StorableObject)

type Transaction

type Transaction struct {
	objectstorage.StorableObjectFlags

	TxHash []byte

	// Decompressed iota.go Transaction containing Hash
	Tx *transaction.Transaction

	// Compressed bytes as received via gossip
	RawBytes []byte
	// contains filtered or unexported fields
}

func NewTransaction

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

func (*Transaction) GetBranch

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

func (*Transaction) GetHash

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

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) IsTail

func (tx *Transaction) IsTail() bool

func (*Transaction) IsValue

func (tx *Transaction) IsValue() bool

func (*Transaction) ObjectStorageKey

func (tx *Transaction) ObjectStorageKey() []byte

func (*Transaction) ObjectStorageValue

func (tx *Transaction) ObjectStorageValue() (data []byte)

func (*Transaction) UnmarshalObjectStorageValue

func (tx *Transaction) UnmarshalObjectStorageValue(data []byte) (consumedBytes int, err error)

func (*Transaction) Update

type TransactionMetadata

type TransactionMetadata struct {
	objectstorage.StorableObjectFlags
	syncutils.RWMutex

	TxHash []byte
	// contains filtered or unexported fields
}

func (*TransactionMetadata) GetConfirmed

func (m *TransactionMetadata) GetConfirmed() (bool, milestone.Index)

func (*TransactionMetadata) GetMetadata

func (m *TransactionMetadata) GetMetadata() byte

func (*TransactionMetadata) GetSolidificationTimestamp

func (m *TransactionMetadata) GetSolidificationTimestamp() int32

func (*TransactionMetadata) IsConfirmed

func (m *TransactionMetadata) IsConfirmed() bool

func (*TransactionMetadata) IsSolid

func (m *TransactionMetadata) IsSolid() bool

func (*TransactionMetadata) ObjectStorageKey

func (m *TransactionMetadata) ObjectStorageKey() []byte

func (*TransactionMetadata) ObjectStorageValue

func (m *TransactionMetadata) ObjectStorageValue() (data []byte)

func (*TransactionMetadata) Reset

func (m *TransactionMetadata) Reset()

func (*TransactionMetadata) SetConfirmed

func (m *TransactionMetadata) SetConfirmed(confirmed bool, confirmationIndex milestone.Index)

func (*TransactionMetadata) SetSolid

func (m *TransactionMetadata) SetSolid(solid bool)

func (*TransactionMetadata) UnmarshalObjectStorageValue

func (m *TransactionMetadata) UnmarshalObjectStorageValue(data []byte) (consumedBytes int, err error)

func (*TransactionMetadata) Update

type UnconfirmedTx

type UnconfirmedTx struct {
	objectstorage.StorableObjectFlags
	LatestMilestoneIndex milestone.Index
	TxHash               []byte
}

func (*UnconfirmedTx) GetLatestMilestoneIndex

func (t *UnconfirmedTx) GetLatestMilestoneIndex() milestone.Index

func (*UnconfirmedTx) GetTransactionHash

func (t *UnconfirmedTx) GetTransactionHash() trinary.Hash

func (*UnconfirmedTx) ObjectStorageKey

func (t *UnconfirmedTx) ObjectStorageKey() []byte

func (*UnconfirmedTx) ObjectStorageValue

func (t *UnconfirmedTx) ObjectStorageValue() (_ []byte)

func (*UnconfirmedTx) UnmarshalObjectStorageValue

func (t *UnconfirmedTx) UnmarshalObjectStorageValue(_ []byte) (consumedBytes int, err error)

func (*UnconfirmedTx) Update

Jump to

Keyboard shortcuts

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