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

Method refundNonInflightBatchTransactions

transaction.go:2433–2444  ·  view source on GitHub ↗

refundNonInflightBatchTransactions refunds all non-inflight transactions in a batch

(ctx context.Context, batchID string)

Source from the content-addressed store, hash-verified

2431
2432// refundNonInflightBatchTransactions refunds all non-inflight transactions in a batch
2433func (l *LedgerForge) refundNonInflightBatchTransactions(ctx context.Context, batchID string) (string, error) {
2434 _, err := l.ProcessTransactionInBatches(
2435 ctx,
2436 batchID,
2437 big.NewInt(0),
2438 1, // Assuming 1 worker is sufficient for rollback, adjust if needed
2439 false,
2440 l.GetRefundableTransactionsByParentID,
2441 l.RefundWorker,
2442 )
2443 return "refunded", err
2444}
2445
2446// logRollbackResult logs the outcome of a rollback operation
2447func (l *LedgerForge) logRollbackResult(batchID string, action string, err error) {

Callers 1

Calls 1

Tested by

no test coverage detected