MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / IsInflightTransaction

Function IsInflightTransaction

inflight_transaction.go:79–84  ·  view source on GitHub ↗

IsInflightTransaction checks whether a transaction is considered "inflight" based on its status and metadata. A transaction is considered inflight if: 1. It has a status of StatusInflight, OR 2. It has a status of StatusQueued AND has the inflight flag set to true in its metadata Parameters: - tran

(transaction *model.Transaction)

Source from the content-addressed store, hash-verified

77// Returns:
78// - bool: true if the transaction is considered inflight, false otherwise
79func IsInflightTransaction(transaction *model.Transaction) bool {
80 return transaction.Status == StatusInflight ||
81 (transaction.Status == StatusQueued &&
82 transaction.MetaData != nil &&
83 transaction.MetaData["inflight"] == true)
84}
85
86// CommitWorker processes commit transactions from the jobs channel and sends the results to the results channel.
87// It starts a tracing span, processes each transaction, and records relevant events and errors.

Callers 4

CommitWorkerMethod · 0.85
VoidWorkerMethod · 0.85

Calls

no outgoing calls

Tested by 1