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

Method voidInflightBatchTransactions

transaction.go:2419–2430  ·  view source on GitHub ↗

voidInflightBatchTransactions voids all inflight transactions in a batch

(ctx context.Context, batchID string)

Source from the content-addressed store, hash-verified

2417
2418// voidInflightBatchTransactions voids all inflight transactions in a batch
2419func (l *LedgerForge) voidInflightBatchTransactions(ctx context.Context, batchID string) (string, error) {
2420 _, err := l.ProcessTransactionInBatches(
2421 ctx,
2422 batchID,
2423 big.NewInt(0),
2424 1, // Assuming 1 worker is sufficient for rollback, adjust if needed
2425 false,
2426 l.GetInflightTransactionsByParentID,
2427 l.VoidWorker,
2428 )
2429 return "voided", err
2430}
2431
2432// refundNonInflightBatchTransactions refunds all non-inflight transactions in a batch
2433func (l *LedgerForge) refundNonInflightBatchTransactions(ctx context.Context, batchID string) (string, error) {

Callers 1

Calls 1

Tested by

no test coverage detected