Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrRefBundleNotValid = errors.New("a referenced bundle is invalid") ErrRefBundleNotComplete = errors.New("a referenced bundle is not complete") RefsAnInvalidBundleCache *datastructure.LRUCache )
var BelowDepthMemoizationCache = belowDepthMemoizationCache{/* contains filtered or unexported fields */}
BelowDepthMemoizationCache caches hashes below a max depth
var Events = pluginEvents{ ReceivedNewTransaction: events.NewEvent(hornet.NewTransactionCaller), ReceivedKnownTransaction: events.NewEvent(hornet.TransactionCaller), TransactionSolid: events.NewEvent(hornet.TransactionCaller), TransactionConfirmed: events.NewEvent(hornet.TransactionConfirmedCaller), TransactionStored: events.NewEvent(hornet.TransactionCaller), ReceivedNewMilestone: events.NewEvent(tangle.BundleCaller), LatestMilestoneChanged: events.NewEvent(tangle.BundleCaller), SolidMilestoneChanged: events.NewEvent(tangle.BundleCaller), SnapshotMilestoneIndexChanged: events.NewEvent(milestone_index.MilestoneIndexCaller), }
var (
PLUGIN = node.NewPlugin("Tangle", node.Enabled, configure, run)
)
Functions ¶
func CheckConsistencyOfConeAndMutateDiff ¶
func CheckConsistencyOfConeAndMutateDiff(tailTxHash trinary.Hash, approved map[trinary.Hash]struct{}, diff map[trinary.Hash]int64) bool
CheckConsistencyOfConeAndMutateDiff checks whether cone referenced by the given tail transaction is consistent with the current diff. this function mutates the approved, respectively walked transaction hashes and the diff with the cone diff, in case the tail transaction is consistent with the latest ledger state.
func GetSolidifierMilestoneIndex ¶
func GetSolidifierMilestoneIndex() milestone_index.MilestoneIndex
func IsBelowMaxDepth ¶
func IsBelowMaxDepth(tailTx *hornet.Transaction, lowerAllowedSnapshotIndex int) bool
IsBelowMaxDepth checks whether the given transaction is below the max depth by first checking whether it is confirmed within the range of allowed milestones. if not, it is checked whether any referenced (directly/indirectly) tx is confirmed by a milestone below the allowed threshold until a limit is reached of analyzed txs, in which case the given tail transaction is also deemed being below max depth.
Types ¶
This section is empty.