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)
| 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. |
| 855 | func (l *LedgerForge) TryRecordQueuedTransactionBatch(ctx context.Context, transaction *model.Transaction) (handled bool, err error) { |
| 856 | return l.tryRecordQueuedTransactionBatch(ctx, transaction, false) |
| 857 | } |
| 858 | |
| 859 | func (l *LedgerForge) TryRecordQueuedTransactionBatchForHotLane(ctx context.Context, transaction *model.Transaction) (handled bool, err error) { |
| 860 | return l.tryRecordQueuedTransactionBatch(ctx, transaction, true) |