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

Method prepareTransactionOutbox

transaction.go:1298–1310  ·  view source on GitHub ↗
(ctx context.Context, transaction *model.Transaction, sourceBalance, destinationBalance *model.Balance)

Source from the content-addressed store, hash-verified

1296}
1297
1298func (l *LedgerForge) prepareTransactionOutbox(ctx context.Context, transaction *model.Transaction, sourceBalance, destinationBalance *model.Balance) *model.LineageOutbox {
1299 if transaction.Status != StatusApplied && transaction.Status != StatusInflight {
1300 return nil
1301 }
1302
1303 // Skip lineage for commits of inflight transactions - lineage was already created for the original.
1304 isInflightCommit := transaction.ParentTransaction != "" && transaction.MetaData != nil && transaction.MetaData["inflight"] == true
1305 if isInflightCommit {
1306 return nil
1307 }
1308
1309 return l.PrepareLineageOutbox(ctx, transaction, sourceBalance, destinationBalance)
1310}
1311
1312func (l *LedgerForge) queuedCoalescingBatchSize(force bool) int {
1313 if !force && !l.Config().Transaction.EnableCoalescing {

Callers 1

Calls 1

PrepareLineageOutboxMethod · 0.95

Tested by

no test coverage detected