Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gas price usage counter #3386

Merged
merged 1 commit into from Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .dialyzer-ignore
Expand Up @@ -30,4 +30,3 @@ lib/explorer/smart_contract/verifier.ex:89
lib/block_scout_web/templates/address_contract/index.html.eex:117
lib/explorer/staking/stake_snapshotting.ex:14: Function do_snapshotting/6 has no local return
lib/explorer/staking/stake_snapshotting.ex:179
lib/explorer/counters/address_gas_usage_counter.ex:69
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,7 +1,7 @@
## Current

### Features
- [#3384](https://github.com/poanetwork/blockscout/pull/3384) - Address total gas usage
- [#3384](https://github.com/poanetwork/blockscout/pull/3384), [#3386](https://github.com/poanetwork/blockscout/pull/3386) - Address total gas usage
- [#3377](https://github.com/poanetwork/blockscout/pull/3377) - Add links to contract libraries
- [#2292](https://github.com/poanetwork/blockscout/pull/2292), [#3356](https://github.com/poanetwork/blockscout/pull/3356), [#3359](https://github.com/poanetwork/blockscout/pull/3359), [#3360](https://github.com/poanetwork/blockscout/pull/3360), [#3365](https://github.com/poanetwork/blockscout/pull/3365) - Add Web UI for POSDAO Staking DApp
- [#3354](https://github.com/poanetwork/blockscout/pull/3354) - Tx hash in EOA coin balance history
Expand Down
10 changes: 5 additions & 5 deletions apps/explorer/config/config.exs
Expand Up @@ -94,17 +94,17 @@ address_transactions_counter_cache_period =
_ -> :timer.hours(1)
end

config :explorer, Explorer.Counters.AddressTransactionsGasUsageCounter,
enabled: true,
enable_consolidation: true,
update_interval_in_seconds: balances_update_interval || 30 * 60

address_transactions_gas_usage_counter_cache_period =
case Integer.parse(System.get_env("ADDRESS_TRANSACTIONS_GAS_USAGE_COUNTER_CACHE_PERIOD", "")) do
{secs, ""} -> :timer.seconds(secs)
_ -> :timer.hours(1)
end

config :explorer, Explorer.Counters.AddressTransactionsGasUsageCounter,
enabled: true,
enable_consolidation: true,
period: address_transactions_gas_usage_counter_cache_period

config :explorer, Explorer.Counters.AddressTransactionsCounter,
enabled: true,
enable_consolidation: true,
Expand Down