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

Function handleTransactionRejection

cmd/workers.go:160–171  ·  view source on GitHub ↗
(ctx context.Context, b *ledgerforgeInstance, txn *model.Transaction, err error)

Source from the content-addressed store, hash-verified

158}
159
160func handleTransactionRejection(ctx context.Context, b *ledgerforgeInstance, txn *model.Transaction, err error) error {
161 _, rejectErr := b.ledgerforge.RejectTransaction(ctx, txn, err.Error())
162 if rejectErr != nil {
163 return rejectErr
164 }
165
166 webhookErr := b.ledgerforge.SendWebhook(ledgerforge.NewWebhook{
167 Event: "transaction.rejected",
168 Payload: *txn,
169 })
170 return webhookErr
171}
172
173func hasReachedMaxRetryAttempt(cfg *config.Configuration, retryCount int) bool {
174 if cfg == nil || cfg.Queue.MaxRetryAttempts <= 0 {

Callers 1

processTransactionMethod · 0.85

Calls 3

RejectTransactionMethod · 0.80
SendWebhookMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected