vertex

package
v0.1.3-testnet Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagPastConeVertexKnown             = FlagsPastCone(0b00000001) // each vertex of consideration has this flag on
	FlagPastConeVertexDefined           = FlagsPastCone(0b00000010) // means vertex is 'defined', i.e. its validity is checked
	FlagPastConeVertexCheckedInTheState = FlagsPastCone(0b00000100) // means vertex has been checked if it is in the state (it may or may not be there)
	FlagPastConeVertexInTheState        = FlagsPastCone(0b00001000) // means vertex is definitely in the state (must be checked before)
	FlagPastConeVertexEndorsementsSolid = FlagsPastCone(0b00010000) // means all endorsements were validated
	FlagPastConeVertexInputsSolid       = FlagsPastCone(0b00100000) // means all consumed inputs are checked and valid
	FlagPastConeVertexAskedForPoke      = FlagsPastCone(0b01000000) //
)
View Source
const (
	FlagVertexDefined                 = Flags(0b00000001)
	FlagVertexConstraintsValid        = Flags(0b00000010)
	FlagVertexTxAttachmentStarted     = Flags(0b00000100)
	FlagVertexTxAttachmentFinished    = Flags(0b00001000)
	FlagVertexIgnoreAbsenceOfPastCone = Flags(0b00010000)
)
View Source
const (
	Undefined = Status(iota)
	Good
	Bad
)

Variables

View Source
var ErrDeletedVertexAccessed = errors.New("deleted vertex should not be accessed")

ErrDeletedVertexAccessed exception is raised by PanicAccessDeleted handler of RUnwrap vertex so that could be caught if necessary

Functions

func AlignedCoverages

func AlignedCoverages(vid1, vid2 *WrappedTx) (uint64, uint64)

AlignedCoverages shifts one of coverages, if necessary, so that to make them comparable

func DisposeVertexArray256

func DisposeVertexArray256(arr []*WrappedTx)

func IsPreferredMilestoneAgainstTheOther

func IsPreferredMilestoneAgainstTheOther(vid1, vid2 *WrappedTx, preferYounger bool) bool

IsPreferredMilestoneAgainstTheOther returns if vid1 is strongly better than vid2 'better' means aligned coverage is bigger, or, if equal, transaction ID is smaller

func TTLDuration

func TTLDuration() time.Duration

func VerticesLines

func VerticesLines(vertices []*WrappedTx, prefix ...string) *lines.Lines

func WrappedOutputsShortLines

func WrappedOutputsShortLines(wOuts []WrappedOutput) *lines.Lines

Types

type Flags

type Flags uint8

func (*Flags) FlagsUp

func (f *Flags) FlagsUp(fl Flags) bool

func (*Flags) SetFlagsUp

func (f *Flags) SetFlagsUp(fl Flags)

func (*Flags) String

func (f *Flags) String() string

type FlagsPastCone

type FlagsPastCone byte

func (FlagsPastCone) FlagsUp

func (f FlagsPastCone) FlagsUp(fl FlagsPastCone) bool

func (FlagsPastCone) String

func (f FlagsPastCone) String() string

type MutationStats

type MutationStats struct {
	NumTransactions int
	NumDeleted      int
	NumCreated      int
}

type PastCone

type PastCone struct {
	global.Logging

	*PastConeBase
	// contains filtered or unexported fields
}

func NewPastCone

func NewPastCone(env global.Logging, tip *WrappedTx, targetTs ledger.Time, name string) *PastCone

func (*PastCone) AddVirtuallyConsumedOutput

func (pc *PastCone) AddVirtuallyConsumedOutput(wOut WrappedOutput, stateReader global.IndexedStateReader) *WrappedOutput

func (*PastCone) AppendPastCone

func (pc *PastCone) AppendPastCone(pcb *PastConeBase, getStateReader func() global.IndexedStateReader)

AppendPastCone appends deterministic past cone to the current one. Does not check for conflicts

func (*PastCone) Assertf

func (pc *PastCone) Assertf(cond bool, format string, args ...any)

func (*PastCone) BeginDelta

func (pc *PastCone) BeginDelta()

func (*PastCone) CalculateSlotInflation

func (pc *PastCone) CalculateSlotInflation() (ret uint64)

func (*PastCone) Check

func (pc *PastCone) Check(stateReader global.IndexedStateReader) (conflict *WrappedOutput)

Check returns double-spent output (conflict), or nil if past cone is consistent The complexity is O(NxM) where N is number of vertices and M is average number of conflicts in the UTXO tangle Practically, it is linear wrt number of vertices because M is 1 or close to 1. for optimization, latest time value can be specified

func (*PastCone) CheckAndClean

func (pc *PastCone) CheckAndClean(stateReader global.IndexedStateReader) (conflict *WrappedOutput)

CheckAndClean iterates past cone, checks for conflicts and removes those vertices which has consumers and all consumers are already in the state

func (*PastCone) CheckFinalPastCone

func (pc *PastCone) CheckFinalPastCone(getStateReader func() global.IndexedStateReader) (err error)

CheckFinalPastCone check determinism consistency of the past cone If rootVid == nil, past cone must be fully deterministic

func (*PastCone) CloneForDebugOnly

func (pc *PastCone) CloneForDebugOnly(env global.Logging, name string) *PastCone

func (*PastCone) CommitDelta

func (pc *PastCone) CommitDelta()

func (*PastCone) ContainsUndefined

func (pc *PastCone) ContainsUndefined() bool

func (*PastCone) CoverageAndDelta

func (pc *PastCone) CoverageAndDelta() (coverage, delta uint64)

func (*PastCone) DisposeAll

func (pc *PastCone) DisposeAll()

func (*PastCone) Flags

func (pc *PastCone) Flags(vid *WrappedTx) FlagsPastCone

func (*PastCone) IsComplete

func (pc *PastCone) IsComplete() bool

func (*PastCone) IsInTheState

func (pc *PastCone) IsInTheState(vid *WrappedTx) (rooted bool)

IsInTheState is definitely known it is in the state

func (*PastCone) IsKnown

func (pc *PastCone) IsKnown(vid *WrappedTx) bool

func (*PastCone) IsKnownDefined

func (pc *PastCone) IsKnownDefined(vid *WrappedTx) bool

func (*PastCone) LedgerCoverage

func (pc *PastCone) LedgerCoverage() uint64

func (*PastCone) Lines

func (pc *PastCone) Lines(prefix ...string) *lines.Lines

func (*PastCone) LinesShort

func (pc *PastCone) LinesShort(prefix ...string) *lines.Lines

func (*PastCone) MakeGraph

func (pc *PastCone) MakeGraph() graph.Graph[string, string]

func (*PastCone) MarkVertexKnown

func (pc *PastCone) MarkVertexKnown(vid *WrappedTx) bool

func (*PastCone) MustMarkVertexNotInTheState

func (pc *PastCone) MustMarkVertexNotInTheState(vid *WrappedTx)

MustMarkVertexNotInTheState is marked definitely not rooted

func (*PastCone) Mutations

func (pc *PastCone) Mutations(slot ledger.Slot) (muts *multistate.Mutations, stats MutationStats)

func (*PastCone) NumVertices

func (pc *PastCone) NumVertices() int

func (*PastCone) RollbackDelta

func (pc *PastCone) RollbackDelta()

func (*PastCone) SaveGraph

func (pc *PastCone) SaveGraph(fname string)

func (*PastCone) SetBaseline

func (pc *PastCone) SetBaseline(vid *WrappedTx) bool

func (*PastCone) SetFlagsDown

func (pc *PastCone) SetFlagsDown(vid *WrappedTx, f FlagsPastCone)

func (*PastCone) SetFlagsUp

func (pc *PastCone) SetFlagsUp(vid *WrappedTx, f FlagsPastCone)

func (*PastCone) Tip

func (pc *PastCone) Tip() *WrappedTx

func (*PastCone) UnReferenceAll

func (pc *PastCone) UnReferenceAll()

func (*PastCone) UndefinedList

func (pc *PastCone) UndefinedList() []*WrappedTx

func (*PastCone) UndefinedListLines

func (pc *PastCone) UndefinedListLines(prefix ...string) *lines.Lines

type PastConeBase

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

func NewPastConeBase

func NewPastConeBase(baseline *WrappedTx) *PastConeBase

func (*PastConeBase) CloneImmutable

func (pb *PastConeBase) CloneImmutable() *PastConeBase

func (*PastConeBase) Dispose

func (pb *PastConeBase) Dispose()

func (*PastConeBase) Len

func (pb *PastConeBase) Len() int

type Status

type Status byte

func StatusFromString

func StatusFromString(s string) Status

func (Status) String

func (s Status) String() string

type TxIDStatus

type TxIDStatus struct {
	ID        ledger.TransactionID
	OnDAG     bool
	InStorage bool
	VirtualTx bool
	Deleted   bool
	Status    Status
	Flags     Flags
	Coverage  *uint64
	Err       error
}

func (*TxIDStatus) JSONAble

func (s *TxIDStatus) JSONAble() (ret TxIDStatusJSONAble)

func (*TxIDStatus) Lines

func (s *TxIDStatus) Lines(prefix ...string) *lines.Lines

type TxIDStatusJSONAble

type TxIDStatusJSONAble struct {
	ID        string `json:"id"`
	OnDAG     bool   `json:"on_dag"`
	InStorage bool   `json:"in_storage"`
	VirtualTx bool   `json:"virtual_tx"`
	Deleted   bool   `json:"deleted"`
	Status    string `json:"status"`
	Flags     byte   `json:"flags"`
	Coverage  uint64 `json:"coverage,omitempty"`
	Err       error  `json:"err"`
}

func (*TxIDStatusJSONAble) Parse

func (s *TxIDStatusJSONAble) Parse() (*TxIDStatus, error)

type UnwrapOptions

type UnwrapOptions struct {
	Vertex    func(v *Vertex)
	VirtualTx func(v *VirtualTransaction)
	Deleted   func()
}

type UnwrapOptionsForTraverse

type UnwrapOptionsForTraverse struct {
	Vertex    func(vidCur *WrappedTx, v *Vertex) bool
	VirtualTx func(vidCur *WrappedTx, v *VirtualTransaction) bool
	TxID      func(txid *ledger.TransactionID)
	Deleted   func(vidCur *WrappedTx) bool
}

type Vertex

type Vertex struct {
	Tx             *transaction.Transaction
	Inputs         []*WrappedTx
	Endorsements   []*WrappedTx
	BaselineBranch *WrappedTx
}

Vertex is a transaction with past cone dependencies

func New

func New(tx *transaction.Transaction) (ret *Vertex)

func (*Vertex) Dispose

func (v *Vertex) Dispose()

func (*Vertex) ForEachEndorsement

func (v *Vertex) ForEachEndorsement(fun func(i byte, vidEndorsed *WrappedTx) bool)

func (*Vertex) ForEachInputDependency

func (v *Vertex) ForEachInputDependency(fun func(i byte, vidInput *WrappedTx) bool)

func (*Vertex) GetConsumedOutput

func (v *Vertex) GetConsumedOutput(i byte) (ret *ledger.Output)

GetConsumedOutput return produced output, is available. Returns nil if unavailable for any reason

func (*Vertex) InputLoaderByIndex

func (v *Vertex) InputLoaderByIndex(i byte) (*ledger.Output, error)

InputLoaderByIndex returns consumed output at index i or nil (if input is orphaned or inaccessible in the virtualTx)

func (*Vertex) Lines

func (v *Vertex) Lines(prefix ...string) *lines.Lines

func (*Vertex) MissingInputTxIDSet

func (v *Vertex) MissingInputTxIDSet() set.Set[ledger.TransactionID]

MissingInputTxIDSet returns set of txids for the missing inputs and endorsements

func (*Vertex) MissingInputTxIDString

func (v *Vertex) MissingInputTxIDString() string

func (*Vertex) NumMissingInputs

func (v *Vertex) NumMissingInputs() (missingInputs int, missingEndorsements int)

func (*Vertex) ReferenceEndorsement

func (v *Vertex) ReferenceEndorsement(i byte, vid *WrappedTx) bool

func (*Vertex) ReferenceInput

func (v *Vertex) ReferenceInput(i byte, vid *WrappedTx) bool

ReferenceInput puts new input and references it. If referencing fails, no change happens and returns false

func (*Vertex) SequencerInputIndex

func (v *Vertex) SequencerInputIndex() byte

func (*Vertex) SetOfInputTransactions

func (v *Vertex) SetOfInputTransactions() set.Set[*WrappedTx]

func (*Vertex) StemInputIndex

func (v *Vertex) StemInputIndex() byte

func (*Vertex) TimeSlot

func (v *Vertex) TimeSlot() ledger.Slot

func (*Vertex) UnReferenceDependencies

func (v *Vertex) UnReferenceDependencies()

UnReferenceDependencies un-references all not nil inputs and endorsements and invalidates vertex structure

func (*Vertex) ValidateConstraints

func (v *Vertex) ValidateConstraints(traceOption ...int) error

ValidateConstraints creates full transaction context from the (solid) vertex data and runs validation of all constraints in the context

func (*Vertex) Wrap

func (v *Vertex) Wrap() *WrappedTx

type VirtualTransaction

type VirtualTransaction struct {
	Created time.Time
	// contains filtered or unexported fields
}

VirtualTransaction is a collection of produced outputs

func (*VirtualTransaction) OutputAt

func (v *VirtualTransaction) OutputAt(idx byte) (*ledger.Output, bool)

OutputAt return output at the index and true, or nil, false if output is not available in the virtual tx

func (*VirtualTransaction) PullNeeded

func (v *VirtualTransaction) PullNeeded() bool

func (*VirtualTransaction) PullPatienceExpired

func (v *VirtualTransaction) PullPatienceExpired(maxPullAttempts int) bool

func (*VirtualTransaction) PullRulesDefined

func (v *VirtualTransaction) PullRulesDefined() bool

func (*VirtualTransaction) SequencerOutputs

func (v *VirtualTransaction) SequencerOutputs() (*ledger.Output, *ledger.Output)

SequencerOutputs returns <seq output>, <stem output> or respective nils

func (*VirtualTransaction) SetPullHappened

func (v *VirtualTransaction) SetPullHappened(repeatAfter time.Duration)

SetPullHappened increases pull counter and sets nex pull deadline

func (*VirtualTransaction) SetPullNeeded

func (v *VirtualTransaction) SetPullNeeded()

type WrappedOutput

type WrappedOutput struct {
	VID   *WrappedTx
	Index byte
}

func (*WrappedOutput) DecodeID

func (o *WrappedOutput) DecodeID() *ledger.OutputID

func (*WrappedOutput) IDHasFragment

func (o *WrappedOutput) IDHasFragment(frag string) bool

func (*WrappedOutput) IDShortString

func (o *WrappedOutput) IDShortString() string

func (*WrappedOutput) IsAvailable

func (o *WrappedOutput) IsAvailable() (available bool)

func (*WrappedOutput) Slot

func (o *WrappedOutput) Slot() ledger.Slot

func (*WrappedOutput) Timestamp

func (o *WrappedOutput) Timestamp() ledger.Time

func (*WrappedOutput) ValidID

func (o *WrappedOutput) ValidID() bool

type WrappedTx

type WrappedTx struct {
	// immutable ID. It does not change with the change of the underlying wrapped vertex type
	ID ledger.TransactionID
	// sequencer ID not nil for sequencer transactions only. Once it is set not nil, it is immutable since.
	// It is set whenever transaction becomes available
	SequencerID atomic.Pointer[ledger.ChainID]
	// contains filtered or unexported fields
}

WrappedTx value of *WrappedTx is used as transaction identity on the UTXO tangle, a vertex Behind this identity can be wrapped usual vertex or virtual transactions

func GetVertexArray256

func GetVertexArray256(size byte) []*WrappedTx

func WrapBranchDataAsVirtualTx

func WrapBranchDataAsVirtualTx(branchData *multistate.BranchData) *WrappedTx

WrapBranchDataAsVirtualTx branch vertex immediately becomes 'good'

func WrapTxID

func WrapTxID(txid ledger.TransactionID) *WrappedTx

WrapTxID creates VID with virtualTx which only contains txid. Also sets solidification deadline, after which IsPullDeadlineDue will start returning true The pull deadline will be dropped after transaction will become available and virtualTx will be converted to full vertex

func (*WrappedTx) AddConsumer

func (vid *WrappedTx) AddConsumer(outputIndex byte, consumer *WrappedTx)

AddConsumer stores consumer of the vid[outputIndex] consumed output. Function checkConflicts checks if new consumer conflicts with already existing ones

func (*WrappedTx) BaselineBranch

func (vid *WrappedTx) BaselineBranch() (baselineBranch *WrappedTx)

BaselineBranch baseline branch of the vertex Will return nil for virtual transaction

func (*WrappedTx) Before

func (vid *WrappedTx) Before(vid1 *WrappedTx) bool

func (*WrappedTx) ConsumersOf

func (vid *WrappedTx) ConsumersOf(outIdx byte) set.Set[*WrappedTx]

func (*WrappedTx) ConvertToVirtualTx

func (vid *WrappedTx) ConvertToVirtualTx()

ConvertToVirtualTx detaches past cone and leaves only a collection of produced outputs

func (*WrappedTx) ConvertVirtualTxToVertexNoLock

func (vid *WrappedTx) ConvertVirtualTxToVertexNoLock(v *Vertex)

func (*WrappedTx) DoPruningIfRelevant

func (vid *WrappedTx) DoPruningIfRelevant(nowis time.Time) (markedForDeletion, unreferencedPastCone bool, references uint32)

DoPruningIfRelevant either marks vertex deleted (counter = 0), or, if it already deleted (counter=0) with TTL matured, un-references its past cone this way helping to prune other older vertices This trick is necessary in order to avoid deadlock between global state of the memeDAG and the local state of the wrappedTx. When trying to modify both atomically will lead to deadlock

func (*WrappedTx) EnsureOutputWithID

func (vid *WrappedTx) EnsureOutputWithID(o *ledger.OutputWithID) (err error)

func (*WrappedTx) FindChainOutput

func (vid *WrappedTx) FindChainOutput(chainID *ledger.ChainID) (ret *ledger.OutputWithID)

func (*WrappedTx) FlagsNoLock

func (vid *WrappedTx) FlagsNoLock() Flags

func (*WrappedTx) FlagsUp

func (vid *WrappedTx) FlagsUp(f Flags) bool

func (*WrappedTx) FlagsUpNoLock

func (vid *WrappedTx) FlagsUpNoLock(f Flags) bool

func (*WrappedTx) GetAttachmentDepthNoLock

func (vid *WrappedTx) GetAttachmentDepthNoLock() int

func (*WrappedTx) GetError

func (vid *WrappedTx) GetError() error

func (*WrappedTx) GetErrorNoLock

func (vid *WrappedTx) GetErrorNoLock() error

func (*WrappedTx) GetLedgerCoverage

func (vid *WrappedTx) GetLedgerCoverage() uint64

func (*WrappedTx) GetLedgerCoverageNoLock

func (vid *WrappedTx) GetLedgerCoverageNoLock() *uint64

func (*WrappedTx) GetLedgerCoverageP

func (vid *WrappedTx) GetLedgerCoverageP() *uint64

func (*WrappedTx) GetLedgerCoverageString

func (vid *WrappedTx) GetLedgerCoverageString() string

func (*WrappedTx) GetPastConeNoLock

func (vid *WrappedTx) GetPastConeNoLock() *PastConeBase

func (*WrappedTx) GetTxStatus

func (vid *WrappedTx) GetTxStatus() Status

func (*WrappedTx) GetTxStatusNoLock

func (vid *WrappedTx) GetTxStatusNoLock() Status

func (*WrappedTx) IDHasFragment

func (vid *WrappedTx) IDHasFragment(frag ...string) bool

func (*WrappedTx) IDShortString

func (vid *WrappedTx) IDShortString() string

func (*WrappedTx) IDVeryShort

func (vid *WrappedTx) IDVeryShort() string

func (*WrappedTx) InflationAmountOfSequencerMilestone

func (vid *WrappedTx) InflationAmountOfSequencerMilestone() (ret uint64)

func (*WrappedTx) InflationConstraintOnSequencerOutput

func (vid *WrappedTx) InflationConstraintOnSequencerOutput() (ret *ledger.InflationConstraint)

func (*WrappedTx) IsBadOrDeleted

func (vid *WrappedTx) IsBadOrDeleted() bool

IsBadOrDeleted non-deterministic

func (*WrappedTx) IsBranchTransaction

func (vid *WrappedTx) IsBranchTransaction() bool

func (*WrappedTx) IsContainingBranchOf

func (vid *WrappedTx) IsContainingBranchOf(vid1 *WrappedTx, getStateReader func() global.IndexedStateReader) bool

func (*WrappedTx) IsSequencerMilestone

func (vid *WrappedTx) IsSequencerMilestone() bool

func (*WrappedTx) IsVirtualTx

func (vid *WrappedTx) IsVirtualTx() (ret bool)

func (*WrappedTx) Lines

func (vid *WrappedTx) Lines(prefix ...string) *lines.Lines

func (*WrappedTx) LinesNoLock

func (vid *WrappedTx) LinesNoLock(prefix ...string) *lines.Lines

func (*WrappedTx) LinesTx

func (vid *WrappedTx) LinesTx(prefix ...string) *lines.Lines

func (*WrappedTx) MustOutputAt

func (vid *WrappedTx) MustOutputAt(idx byte) *ledger.Output

func (*WrappedTx) MustOutputWithIDAt

func (vid *WrappedTx) MustOutputWithIDAt(idx byte) (ret ledger.OutputWithID)

func (*WrappedTx) MustReference

func (vid *WrappedTx) MustReference()

func (*WrappedTx) MustSequencerIDAndStemID

func (vid *WrappedTx) MustSequencerIDAndStemID() (seqID ledger.ChainID, stemID ledger.OutputID)

func (*WrappedTx) NotConsumedOutputIndices

func (vid *WrappedTx) NotConsumedOutputIndices(allConsumers set.Set[*WrappedTx]) []byte

func (*WrappedTx) NumConsumers

func (vid *WrappedTx) NumConsumers() (numConsumedOutputs, numConflictSets int)

NumConsumers returns: - number of consumed outputs - number of conflict sets

func (*WrappedTx) NumInputs

func (vid *WrappedTx) NumInputs() int

func (*WrappedTx) NumProducedOutputs

func (vid *WrappedTx) NumProducedOutputs() int

func (*WrappedTx) NumReferences

func (vid *WrappedTx) NumReferences() int

func (*WrappedTx) OnPoke

func (vid *WrappedTx) OnPoke(fun func())

func (*WrappedTx) OutputAt

func (vid *WrappedTx) OutputAt(idx byte) (*ledger.Output, error)

OutputAt return output at index, if available. err != nil indicates wrong index nil, nil means output not available, but no error (orphaned)

func (*WrappedTx) OutputID

func (vid *WrappedTx) OutputID(idx byte) (ret ledger.OutputID)

func (*WrappedTx) OutputWithIDAt

func (vid *WrappedTx) OutputWithIDAt(idx byte) (ledger.OutputWithID, error)

func (*WrappedTx) PanicAccessDeleted

func (vid *WrappedTx) PanicAccessDeleted()

func (*WrappedTx) Poke

func (vid *WrappedTx) Poke()

func (*WrappedTx) RUnwrap

func (vid *WrappedTx) RUnwrap(opt UnwrapOptions)

func (*WrappedTx) Reference

func (vid *WrappedTx) Reference() bool

Reference increments reference counter for the vertex which is not deleted yet (counter > 0). It also updates TTL for the vertex

func (*WrappedTx) SequencerIDStringVeryShort

func (vid *WrappedTx) SequencerIDStringVeryShort() string

func (*WrappedTx) SequencerPredecessor

func (vid *WrappedTx) SequencerPredecessor() (ret *WrappedTx)

func (*WrappedTx) SequencerWrappedOutput

func (vid *WrappedTx) SequencerWrappedOutput() (ret WrappedOutput)

func (*WrappedTx) SetAttachmentDepthNoLock

func (vid *WrappedTx) SetAttachmentDepthNoLock(depth int)

func (*WrappedTx) SetFlagsUpNoLock

func (vid *WrappedTx) SetFlagsUpNoLock(f Flags)

func (*WrappedTx) SetSequencerAttachmentFinished

func (vid *WrappedTx) SetSequencerAttachmentFinished()

func (*WrappedTx) SetTxStatusBad

func (vid *WrappedTx) SetTxStatusBad(reason error)

func (*WrappedTx) SetTxStatusBadNoLock

func (vid *WrappedTx) SetTxStatusBadNoLock(reason error)

func (*WrappedTx) SetTxStatusGood

func (vid *WrappedTx) SetTxStatusGood(pastCone *PastConeBase, coverage uint64)

SetTxStatusGood sets 'good' status and past cone

func (*WrappedTx) ShortString

func (vid *WrappedTx) ShortString() string

func (*WrappedTx) Slot

func (vid *WrappedTx) Slot() ledger.Slot

func (*WrappedTx) StemWrappedOutput

func (vid *WrappedTx) StemWrappedOutput() (ret WrappedOutput)

func (*WrappedTx) String

func (vid *WrappedTx) String() (ret string)

func (*WrappedTx) StringNoLock

func (vid *WrappedTx) StringNoLock() string

func (*WrappedTx) Timestamp

func (vid *WrappedTx) Timestamp() ledger.Time

func (*WrappedTx) TraversePastConeDepthFirst

func (vid *WrappedTx) TraversePastConeDepthFirst(opt UnwrapOptionsForTraverse, visited ...set.Set[*WrappedTx])

TraversePastConeDepthFirst performs depth-first traverse of the MemDAG. Visiting once each node and calling vertex-type specific function if provided on each. If function returns false, the traverse is cancelled globally. The traverse stops at terminal dag. The vertex is terminal if it either is not-full vertex i.e. (booked, orphaned, deleted) or it belongs to 'visited' set If 'visited' set is provided at call, it is mutable. In the end it contains all initial dag plus all dag visited during the traverse

func (*WrappedTx) UnReference

func (vid *WrappedTx) UnReference()

UnReference decrements reference counter down to 1. It panics if counter value 1 is decremented because the value 0 is reserved for the deleted vertices (handled by DoPruningIfRelevant)

func (*WrappedTx) Unwrap

func (vid *WrappedTx) Unwrap(opt UnwrapOptions)

func (*WrappedTx) UnwrapVirtualTx

func (vid *WrappedTx) UnwrapVirtualTx(unwrapFun func(v *VirtualTransaction))

UnwrapVirtualTx calls callback only if it is virtualTx

func (*WrappedTx) WithConsumersRLock

func (vid *WrappedTx) WithConsumersRLock(fun func())

func (*WrappedTx) WrappedInputs

func (vid *WrappedTx) WrappedInputs() (ret []WrappedOutput)

Jump to

Keyboard shortcuts

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