Documentation ¶
Index ¶
- Constants
- Variables
- func OptionDoNotStartPruner(c *ConfigParams)
- func OptionEnableSyncManager(c *ConfigParams)
- type ConfigOption
- type ConfigParams
- type TxInOption
- type Workflow
- func (w *Workflow) AddWantedTransaction(txid *ledger.TransactionID)
- func (w *Workflow) EnsureBranch(txid ledger.TransactionID, timeout ...time.Duration) (*vertex.WrappedTx, error)
- func (w *Workflow) EnsureLatestBranches() error
- func (w *Workflow) EvidenceNonSequencerTx()
- func (w *Workflow) GetLatestMilestone(seqID ledger.ChainID) *vertex.WrappedTx
- func (w *Workflow) GetTxInclusion(txid *ledger.TransactionID, slotsBack int) *multistate.TxInclusion
- func (w *Workflow) GossipAttachedTransaction(tx *transaction.Transaction, metadata *txmetadata.TransactionMetadata)
- func (w *Workflow) GossipTxBytesToPeers(txBytes []byte, metadata *txmetadata.TransactionMetadata, except ...peer.ID)
- func (w *Workflow) IsSynced() bool
- func (w *Workflow) LatestMilestonesDescending(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
- func (w *Workflow) LatestMilestonesShuffled(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
- func (w *Workflow) ListenToAccount(account ledger.Accountable, fun func(wOut vertex.WrappedOutput))
- func (w *Workflow) ListenToSequencers(fun func(vid *vertex.WrappedTx))
- func (w *Workflow) MaxDurationInTheFuture() time.Duration
- func (w *Workflow) MustEnsureBranch(txid ledger.TransactionID) *vertex.WrappedTx
- func (w *Workflow) MustPersistTxBytesWithMetadata(txBytes []byte, metadata *txmetadata.TransactionMetadata)
- func (w *Workflow) NumSequencerTips() int
- func (w *Workflow) OwnSequencerMilestoneIn(txBytes []byte, meta *txmetadata.TransactionMetadata)
- func (w *Workflow) PeerName(id peer.ID) string
- func (w *Workflow) PokeAllWith(wanted *vertex.WrappedTx)
- func (w *Workflow) PokeMe(me, with *vertex.WrappedTx)
- func (w *Workflow) PostEventNewGood(vid *vertex.WrappedTx)
- func (w *Workflow) PostEventNewTransaction(vid *vertex.WrappedTx)
- func (w *Workflow) QueryTxIDStatus(txid *ledger.TransactionID) (ret vertex.TxIDStatus)
- func (w *Workflow) QueryTxIDStatusJSONAble(txid *ledger.TransactionID) vertex.TxIDStatusJSONAble
- func (w *Workflow) SaveFullDAG(fname string)
- func (w *Workflow) SendToTippool(vid *vertex.WrappedTx)
- func (w *Workflow) SendTxBytesWithMetadataToPeer(id peer.ID, txBytes []byte, metadata *txmetadata.TransactionMetadata) bool
- func (w *Workflow) TxBytesFromStoreIn(txBytesWithMetadata []byte) (*ledger.TransactionID, error)
- func (w *Workflow) TxBytesIn(txBytes []byte, opts ...TxInOption) (*ledger.TransactionID, error)
- func (w *Workflow) TxBytesInFromAPIQueued(txBytes []byte)
- func (w *Workflow) TxBytesInFromPeerQueued(txBytes []byte, metaData *txmetadata.TransactionMetadata, from peer.ID, ...)
- func (w *Workflow) TxFromStoreIn(txid *ledger.TransactionID) (err error)
- func (w *Workflow) TxIn(tx *transaction.Transaction, opts ...TxInOption) error
- func (w *Workflow) TxInFromAPI(tx *transaction.Transaction) error
- func (w *Workflow) TxInFromPeer(tx *transaction.Transaction, metaData *txmetadata.TransactionMetadata, ...) error
- func (w *Workflow) WaitTxIDDefined(txid *ledger.TransactionID, pollPeriod, timeout time.Duration) (vertex.Status, error)
Constants ¶
View Source
const (
TraceTagTxInput = "txinput"
)
Variables ¶
View Source
var ( EventNewGoodTx = eventtype.RegisterNew[*vertex.WrappedTx]("new good seq") EventNewTx = eventtype.RegisterNew[*vertex.WrappedTx]("new tx") // event may be posted more than once for the transaction )
Functions ¶
func OptionDoNotStartPruner ¶
func OptionDoNotStartPruner(c *ConfigParams)
OptionDoNotStartPruner used for testing, to disable pruner Config key: 'workflow.do_not_start_pruner: true'
func OptionEnableSyncManager ¶
func OptionEnableSyncManager(c *ConfigParams)
OptionEnableSyncManager used to disable sync manager which is optional if sync is not long Config key: 'workflow.do_not_start_sync_manager: true'
Types ¶
type ConfigOption ¶
type ConfigOption func(c *ConfigParams)
type ConfigParams ¶
type ConfigParams struct {
// contains filtered or unexported fields
}
type TxInOption ¶
type TxInOption func(options *txInOptions)
func WithMetadata ¶
func WithMetadata(metadata *txmetadata.TransactionMetadata) TxInOption
func WithPeerMetadata ¶
func WithPeerMetadata(peerID peer.ID, metadata *txmetadata.TransactionMetadata) TxInOption
func WithSourceType ¶
func WithSourceType(sourceType txmetadata.SourceType) TxInOption
type Workflow ¶
func StartFromConfig ¶
func (*Workflow) AddWantedTransaction ¶
func (w *Workflow) AddWantedTransaction(txid *ledger.TransactionID)
func (*Workflow) EnsureBranch ¶
func (*Workflow) EnsureLatestBranches ¶
func (*Workflow) EvidenceNonSequencerTx ¶
func (w *Workflow) EvidenceNonSequencerTx()
func (*Workflow) GetLatestMilestone ¶
func (*Workflow) GetTxInclusion ¶
func (w *Workflow) GetTxInclusion(txid *ledger.TransactionID, slotsBack int) *multistate.TxInclusion
func (*Workflow) GossipAttachedTransaction ¶
func (w *Workflow) GossipAttachedTransaction(tx *transaction.Transaction, metadata *txmetadata.TransactionMetadata)
func (*Workflow) GossipTxBytesToPeers ¶
func (w *Workflow) GossipTxBytesToPeers(txBytes []byte, metadata *txmetadata.TransactionMetadata, except ...peer.ID)
func (*Workflow) LatestMilestonesDescending ¶
func (w *Workflow) LatestMilestonesDescending(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
LatestMilestonesDescending returns optionally filtered sorted transactions from the sequencer tippool
func (*Workflow) LatestMilestonesShuffled ¶
func (w *Workflow) LatestMilestonesShuffled(filter ...func(seqID ledger.ChainID, vid *vertex.WrappedTx) bool) []*vertex.WrappedTx
LatestMilestonesShuffled returns optionally filtered sorted transactions from the sequencer tippool
func (*Workflow) ListenToAccount ¶
func (w *Workflow) ListenToAccount(account ledger.Accountable, fun func(wOut vertex.WrappedOutput))
ListenToAccount listens to all outputs which belongs to the account (except stem-locked outputs)
func (*Workflow) ListenToSequencers ¶
func (*Workflow) MaxDurationInTheFuture ¶
func (*Workflow) MustEnsureBranch ¶
func (w *Workflow) MustEnsureBranch(txid ledger.TransactionID) *vertex.WrappedTx
func (*Workflow) MustPersistTxBytesWithMetadata ¶
func (w *Workflow) MustPersistTxBytesWithMetadata(txBytes []byte, metadata *txmetadata.TransactionMetadata)
func (*Workflow) NumSequencerTips ¶
func (*Workflow) OwnSequencerMilestoneIn ¶
func (w *Workflow) OwnSequencerMilestoneIn(txBytes []byte, meta *txmetadata.TransactionMetadata)
func (*Workflow) PokeAllWith ¶
func (*Workflow) PostEventNewGood ¶
func (*Workflow) PostEventNewTransaction ¶
func (*Workflow) QueryTxIDStatus ¶
func (w *Workflow) QueryTxIDStatus(txid *ledger.TransactionID) (ret vertex.TxIDStatus)
func (*Workflow) QueryTxIDStatusJSONAble ¶
func (w *Workflow) QueryTxIDStatusJSONAble(txid *ledger.TransactionID) vertex.TxIDStatusJSONAble
func (*Workflow) SaveFullDAG ¶
func (*Workflow) SendToTippool ¶
func (*Workflow) SendTxBytesWithMetadataToPeer ¶
func (w *Workflow) SendTxBytesWithMetadataToPeer(id peer.ID, txBytes []byte, metadata *txmetadata.TransactionMetadata) bool
func (*Workflow) TxBytesFromStoreIn ¶
func (w *Workflow) TxBytesFromStoreIn(txBytesWithMetadata []byte) (*ledger.TransactionID, error)
func (*Workflow) TxBytesIn ¶
func (w *Workflow) TxBytesIn(txBytes []byte, opts ...TxInOption) (*ledger.TransactionID, error)
func (*Workflow) TxBytesInFromAPIQueued ¶
func (*Workflow) TxBytesInFromPeerQueued ¶
func (w *Workflow) TxBytesInFromPeerQueued(txBytes []byte, metaData *txmetadata.TransactionMetadata, from peer.ID, txData []byte)
func (*Workflow) TxFromStoreIn ¶
func (w *Workflow) TxFromStoreIn(txid *ledger.TransactionID) (err error)
func (*Workflow) TxIn ¶
func (w *Workflow) TxIn(tx *transaction.Transaction, opts ...TxInOption) error
func (*Workflow) TxInFromAPI ¶
func (w *Workflow) TxInFromAPI(tx *transaction.Transaction) error
func (*Workflow) TxInFromPeer ¶
func (w *Workflow) TxInFromPeer(tx *transaction.Transaction, metaData *txmetadata.TransactionMetadata, from peer.ID) error
func (*Workflow) WaitTxIDDefined ¶
Click to show internal directories.
Click to hide internal directories.