Skip to content

Commit

Permalink
bugfix: tx_volume queries: represent "1 day" correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mitjat committed Jan 23, 2023
1 parent 4b97125 commit 53d0507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/spec/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ x-query-params:
schema:
type: integer
format: uint32
default: 3600
default: 86400
description: |
The size of buckets into which the statistic is grouped, in seconds.
The backend supports a limited number of bucket sizes: 300 (5 minutes) and
3600 (1 hour). Requests with other values may be rejected.
86400 (1 day). Requests with other values may be rejected.
x-examples:
chain-id:
Expand Down
4 changes: 2 additions & 2 deletions storage/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1461,8 +1461,8 @@ func (c *StorageClient) TxVolumes(ctx context.Context, layer apiTypes.Layer, p a
if *p.BucketSizeSeconds == 300 {
query = qf.FineTxVolumesQuery()
} else {
var hour uint32 = 3600
p.BucketSizeSeconds = &hour
var day uint32 = 86400
p.BucketSizeSeconds = &day
query = qf.TxVolumesQuery()
}

Expand Down

0 comments on commit 53d0507

Please sign in to comment.