MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / planTransactionExecution

Method planTransactionExecution

transaction.go:661–670  ·  view source on GitHub ↗

planTransactionExecution selects the internal execution mode for a transaction based on whether queued batching is allowed and whether hot-lane execution should be used.

(transaction *model.Transaction, allowQueuedBatch, hotLane bool)

Source from the content-addressed store, hash-verified

659// planTransactionExecution selects the internal execution mode for a transaction based on
660// whether queued batching is allowed and whether hot-lane execution should be used.
661func (l *LedgerForge) planTransactionExecution(transaction *model.Transaction, allowQueuedBatch, hotLane bool) transactionExecutionPlan {
662 if allowQueuedBatch {
663 if hotLane {
664 return transactionExecutionPlan{mode: transactionExecutionModeHotQueuedBatch, transaction: transaction}
665 }
666 return transactionExecutionPlan{mode: transactionExecutionModeQueuedBatch, transaction: transaction}
667 }
668
669 return transactionExecutionPlan{mode: transactionExecutionModeSingle, transaction: transaction}
670}
671
672// executeTransactionPlan runs the selected internal execution mode and fails open from queued
673// batching back to the single-transaction path when batching does not handle the work.

Callers 3

RecordTransactionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected