Skip to content

Commit

Permalink
refactor: camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Dec 19, 2024
1 parent 8351d8e commit 1be1818
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/meterer/meterer.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ func (m *Meterer) ServeOnDemandRequest(ctx context.Context, header core.PaymentM
// Update bin usage atomically and check against bin capacity
if err := m.IncrementGlobalBinUsage(ctx, uint64(symbolsCharged)); err != nil {
//TODO: conditionally remove the payment based on the error type (maybe if the error is store-op related)
db_err := m.OffchainStore.RemoveOnDemandPayment(ctx, header.AccountID, header.CumulativePayment)
if db_err != nil {
return db_err
dbErr := m.OffchainStore.RemoveOnDemandPayment(ctx, header.AccountID, header.CumulativePayment)
if dbErr != nil {
return dbErr
}
return fmt.Errorf("failed global rate limiting: %w", err)
}
Expand Down

0 comments on commit 1be1818

Please sign in to comment.