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

Method TryRecordQueuedTransactionBatch

transaction.go:855–857  ·  view source on GitHub ↗

TryRecordQueuedTransactionBatch opportunistically coalesces multiple QUEUED transactions that share the same contention shape into a single balance commit. It prefers the narrowest safe scope first (pair, then source, then destination) and fails open by returning handled=false if batching would be u

(ctx context.Context, transaction *model.Transaction)

Source from the content-addressed store, hash-verified

853// scope first (pair, then source, then destination) and fails open by returning handled=false if
854// batching would be unsafe or provides no benefit.
855func (l *LedgerForge) TryRecordQueuedTransactionBatch(ctx context.Context, transaction *model.Transaction) (handled bool, err error) {
856 return l.tryRecordQueuedTransactionBatch(ctx, transaction, false)
857}
858
859func (l *LedgerForge) TryRecordQueuedTransactionBatchForHotLane(ctx context.Context, transaction *model.Transaction) (handled bool, err error) {
860 return l.tryRecordQueuedTransactionBatch(ctx, transaction, true)

Calls 1