Skip to content

Commit

Permalink
fix: global period usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Dec 13, 2024
1 parent 4eff180 commit b42442d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/meterer/meterer.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (m *Meterer) IncrementGlobalBinUsage(ctx context.Context, symbolsCharged ui
if err != nil {
return fmt.Errorf("failed to increment global bin usage: %w", err)
}
if newUsage > m.ChainPaymentState.GetGlobalSymbolsPerSecond() {
if newUsage > m.ChainPaymentState.GetGlobalSymbolsPerSecond()*uint64(m.ChainPaymentState.GetGlobalRatePeriodInterval()) {
return fmt.Errorf("global bin usage overflows")
}
return nil
Expand Down

0 comments on commit b42442d

Please sign in to comment.