Merge remote-tracking branch 'origin/master' into vb-fix-performance-coin-balance-history-nnew-wave

pull/3125/head
Victor Baranov 5 years ago
commit c36a21f71b
  1. 1
      CHANGELOG.md
  2. 15
      apps/indexer/lib/indexer/fetcher/coin_balance.ex

@ -3,6 +3,7 @@
### Features
### Fixes
- [#3126](https://github.com/poanetwork/blockscout/pull/3126) - Fetch balance only for blocks which are greater or equal block with FIRST_BLOCK number
- [#3125](https://github.com/poanetwork/blockscout/pull/3125) - Fix performance of coin balance history chart
- [#3122](https://github.com/poanetwork/blockscout/pull/3122) - Exclude balance percentage calculation for burn address on accounts page
- [#3121](https://github.com/poanetwork/blockscout/pull/3121) - Geth: handle response from eth_getblockbyhash JSON RPC method without totalDifficulty (uncle blocks)

@ -79,7 +79,7 @@ defmodule Indexer.Fetcher.CoinBalance do
unique_filtered_entries =
Enum.filter(unique_entries, fn {_hash, block_number} ->
block_number > first_block_to_index()
block_number >= first_block_to_index()
end)
unique_entry_count = Enum.count(unique_filtered_entries)
@ -92,7 +92,7 @@ defmodule Indexer.Fetcher.CoinBalance do
|> EthereumJSONRPC.fetch_balances(json_rpc_named_arguments)
|> case do
{:ok, fetched_balances} ->
run_fetched_balances(fetched_balances, unique_entries)
run_fetched_balances(fetched_balances, unique_filtered_entries)
{:error, reason} ->
Logger.error(
@ -102,7 +102,16 @@ defmodule Indexer.Fetcher.CoinBalance do
error_count: unique_entry_count
)
{:retry, unique_entries}
{:retry, unique_filtered_entries}
end
end
defp first_block_to_index do
string_value = Application.get_env(:indexer, :first_block)
case Integer.parse(string_value) do
{integer, ""} -> integer
_ -> 0
end
end

Loading…
Cancel
Save