Documentation
¶
Index ¶
- Constants
- Variables
- type Bundle
- func (bundle *Bundle) GetHead() *Transaction
- func (bundle *Bundle) GetLedgerChanges() map[string]int64
- func (bundle *Bundle) GetMilestoneHash() hornet.Hash
- func (bundle *Bundle) GetMilestoneIndex() milestone.Index
- func (bundle *Bundle) GetTail() *Transaction
- func (bundle *Bundle) GetTailHash() hornet.Hash
- func (bundle *Bundle) GetTransactions() []*Transaction
- func (bundle *Bundle) IsValid() bool
- func (bundle *Bundle) IsValueSpam() bool
- func (bundle *Bundle) Unmarshal(data []byte) error
- type Database
- func (db *Database) CloseDatabases() error
- func (db *Database) ContainsAddress(address hornet.Hash, txHash hornet.Hash, valueOnly bool) bool
- func (db *Database) ContainsApprover(txHash hornet.Hash, approverHash hornet.Hash) bool
- func (db *Database) ContainsTag(txTag hornet.Hash, txHash hornet.Hash) bool
- func (db *Database) GetApproverHashes(txHash hornet.Hash, maxFind ...int) hornet.Hashes
- func (db *Database) GetBalanceForAddress(address hornet.Hash) (uint64, milestone.Index, error)
- func (db *Database) GetBundleOrNil(tailTxHash hornet.Hash) *Bundle
- func (db *Database) GetBundleTransactionHashes(bundleHash hornet.Hash, forceRelease bool, maxFind ...int) hornet.Hashes
- func (db *Database) GetLatestSolidMilestoneBundle() *Bundle
- func (db *Database) GetLedgerDiffForMilestone(ctx context.Context, targetIndex milestone.Index) (map[string]int64, error)
- func (db *Database) GetLedgerIndex() milestone.Index
- func (db *Database) GetLedgerStateForLSMI(ctx context.Context) (map[string]uint64, milestone.Index, error)
- func (db *Database) GetLedgerStateForMilestone(ctx context.Context, targetIndex milestone.Index) (map[string]uint64, milestone.Index, error)
- func (db *Database) GetMilestoneBundleOrNil(milestoneIndex milestone.Index) *Bundle
- func (db *Database) GetMilestoneOrNil(milestoneIndex milestone.Index) *Milestone
- func (db *Database) GetSolidMilestoneIndex() milestone.Index
- func (db *Database) GetTagHashes(txTag hornet.Hash, forceRelease bool, maxFind ...int) hornet.Hashes
- func (db *Database) GetTransactionHashesForAddress(address hornet.Hash, valueOnly bool, forceRelease bool, maxFind ...int) hornet.Hashes
- func (db *Database) GetTransactionOrNil(txHash hornet.Hash) *Transaction
- func (db *Database) GetTxMetadataOrNil(txHash hornet.Hash) *TransactionMetadata
- func (db *Database) LatestSyncState() *SyncState
- func (db *Database) SolidEntryPointsContain(txHash hornet.Hash) bool
- func (db *Database) WasAddressSpentFrom(address hornet.Hash) bool
- type Milestone
- type SnapshotInfo
- type SolidEntryPoints
- type SyncState
- type Transaction
- func (tx *Transaction) GetBranchHash() hornet.Hash
- func (tx *Transaction) GetBundleHash() hornet.Hash
- func (tx *Transaction) GetTrunkHash() hornet.Hash
- func (tx *Transaction) IsHead() bool
- func (tx *Transaction) IsTail() bool
- func (tx *Transaction) IsValue() bool
- func (tx *Transaction) Unmarshal(data []byte) error
- type TransactionMetadata
- func (m *TransactionMetadata) GetBranchHash() hornet.Hash
- func (m *TransactionMetadata) GetBundleHash() hornet.Hash
- func (m *TransactionMetadata) GetConfirmed() (bool, milestone.Index)
- func (m *TransactionMetadata) GetTrunkHash() hornet.Hash
- func (m *TransactionMetadata) GetTxHash() hornet.Hash
- func (m *TransactionMetadata) IsConfirmed() bool
- func (m *TransactionMetadata) IsConflicting() bool
- func (m *TransactionMetadata) IsTail() bool
- func (m *TransactionMetadata) SetAdditionalTxInfo(trunkHash hornet.Hash, branchHash hornet.Hash, bundleHash hornet.Hash, ...)
- func (m *TransactionMetadata) Unmarshal(data []byte) error
Constants ¶
View Source
const ( MetadataSolid = 0 MetadataValid = 1 MetadataConfirmed = 2 MetadataIsMilestone = 3 MetadataIsValueSpam = 4 MetadataValidStrictSemantics = 5 MetadataConflicting = 6 MetadataInvalidPastCone = 7 )
View Source
const ( StorePrefixHealth byte = 0 StorePrefixTransactions byte = 1 StorePrefixTransactionMetadata byte = 2 StorePrefixBundleTransactions byte = 3 StorePrefixBundles byte = 4 StorePrefixAddresses byte = 5 StorePrefixMilestones byte = 6 StorePrefixLedgerState byte = 7 StorePrefixLedgerBalance byte = 8 StorePrefixLedgerDiff byte = 9 StorePrefixApprovers byte = 10 StorePrefixTags byte = 11 StorePrefixSnapshot byte = 12 StorePrefixSnapshotLedger byte = 13 StorePrefixUnconfirmedTransactions byte = 14 StorePrefixSpentAddresses byte = 15 StorePrefixAutopeering byte = 16 StorePrefixWhiteFlag byte = 17 )
View Source
const ( TransactionMetadataSolid = 0 TransactionMetadataConfirmed = 1 TransactionMetadataConflicting = 2 TransactionMetadataIsHead = 3 TransactionMetadataIsTail = 4 TransactionMetadataIsValue = 5 )
View Source
const (
AddressTxIsValue = 1
)
View Source
const (
BundleTxIsTail = 1
)
View Source
const (
DBVersion = 2
)
View Source
const (
SnapshotMetadataSpentAddressesEnabled = 0
)
Variables ¶
View Source
var ( // ErrOperationAborted is returned when the operation was aborted e.g. by a shutdown signal. ErrOperationAborted = errors.New("operation was aborted") )
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func (*Bundle) GetHead ¶
func (bundle *Bundle) GetHead() *Transaction
func (*Bundle) GetLedgerChanges ¶
func (*Bundle) GetMilestoneHash ¶
func (*Bundle) GetMilestoneIndex ¶
func (*Bundle) GetTail ¶
func (bundle *Bundle) GetTail() *Transaction
func (*Bundle) GetTailHash ¶
func (*Bundle) GetTransactions ¶
func (bundle *Bundle) GetTransactions() []*Transaction
func (*Bundle) IsValueSpam ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) CloseDatabases ¶
func (*Database) ContainsAddress ¶
ContainsAddress returns if the given address exists in the cache/persistence layer.
func (*Database) ContainsApprover ¶
ContainsApprover returns if the given approver exists in the cache/persistence layer.
func (*Database) ContainsTag ¶
ContainsTag returns if the given tag exists in the cache/persistence layer.
func (*Database) GetApproverHashes ¶
func (*Database) GetBalanceForAddress ¶
func (*Database) GetBundleOrNil ¶
func (*Database) GetBundleTransactionHashes ¶
func (*Database) GetLatestSolidMilestoneBundle ¶
GetLatestSolidMilestoneBundle returns the latest solid milestone bundle.
func (*Database) GetLedgerDiffForMilestone ¶
func (db *Database) GetLedgerDiffForMilestone(ctx context.Context, targetIndex milestone.Index) (map[string]int64, error)
GetLedgerDiffForMilestone returns the ledger changes of that specific milestone.
func (*Database) GetLedgerIndex ¶
func (*Database) GetLedgerStateForLSMI ¶
func (db *Database) GetLedgerStateForLSMI(ctx context.Context) (map[string]uint64, milestone.Index, error)
GetLedgerStateForLSMI returns all balances for the current solid milestone.
func (*Database) GetLedgerStateForMilestone ¶
func (*Database) GetMilestoneBundleOrNil ¶
GetMilestoneBundleOrNil returns the Bundle of a milestone index or nil if it doesn't exist.
func (*Database) GetMilestoneOrNil ¶
func (*Database) GetSolidMilestoneIndex ¶
GetSolidMilestoneIndex returns the latest solid milestone index.
func (*Database) GetTagHashes ¶
func (*Database) GetTransactionHashesForAddress ¶
func (*Database) GetTransactionOrNil ¶
func (db *Database) GetTransactionOrNil(txHash hornet.Hash) *Transaction
func (*Database) GetTxMetadataOrNil ¶
func (db *Database) GetTxMetadataOrNil(txHash hornet.Hash) *TransactionMetadata
func (*Database) LatestSyncState ¶
func (*Database) SolidEntryPointsContain ¶
type SnapshotInfo ¶
type SnapshotInfo struct {
CoordinatorAddress hornet.Hash
Hash hornet.Hash
SnapshotIndex milestone.Index
EntryPointIndex milestone.Index
PruningIndex milestone.Index
Timestamp int64
Metadata bitmask.BitMask
}
func (*SnapshotInfo) IsSpentAddressesEnabled ¶
func (i *SnapshotInfo) IsSpentAddressesEnabled() bool
type SolidEntryPoints ¶
type SolidEntryPoints struct {
// contains filtered or unexported fields
}
type Transaction ¶
type Transaction struct {
// Decompressed iota.go Transaction containing Hash
Tx *transaction.Transaction
// contains filtered or unexported fields
}
func NewTransaction ¶
func NewTransaction(txHash hornet.Hash) *Transaction
func (*Transaction) GetBranchHash ¶
func (tx *Transaction) GetBranchHash() hornet.Hash
func (*Transaction) GetBundleHash ¶
func (tx *Transaction) GetBundleHash() hornet.Hash
func (*Transaction) GetTrunkHash ¶
func (tx *Transaction) GetTrunkHash() hornet.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) Unmarshal ¶
func (tx *Transaction) Unmarshal(data []byte) error
type TransactionMetadata ¶
type TransactionMetadata struct {
// contains filtered or unexported fields
}
func NewTransactionMetadata ¶
func NewTransactionMetadata(txHash hornet.Hash) *TransactionMetadata
func (*TransactionMetadata) GetBranchHash ¶
func (m *TransactionMetadata) GetBranchHash() hornet.Hash
func (*TransactionMetadata) GetBundleHash ¶
func (m *TransactionMetadata) GetBundleHash() hornet.Hash
func (*TransactionMetadata) GetConfirmed ¶
func (m *TransactionMetadata) GetConfirmed() (bool, milestone.Index)
func (*TransactionMetadata) GetTrunkHash ¶
func (m *TransactionMetadata) GetTrunkHash() hornet.Hash
func (*TransactionMetadata) GetTxHash ¶
func (m *TransactionMetadata) GetTxHash() hornet.Hash
func (*TransactionMetadata) IsConfirmed ¶
func (m *TransactionMetadata) IsConfirmed() bool
func (*TransactionMetadata) IsConflicting ¶
func (m *TransactionMetadata) IsConflicting() bool
func (*TransactionMetadata) IsTail ¶
func (m *TransactionMetadata) IsTail() bool
func (*TransactionMetadata) SetAdditionalTxInfo ¶
func (*TransactionMetadata) Unmarshal ¶
func (m *TransactionMetadata) Unmarshal(data []byte) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.