upto -> up to

pull/848/head
Luke Imhoff 6 years ago
parent 088589b11a
commit c60ae9467f
  1. 4
      apps/indexer/lib/indexer/block/catchup/fetcher.ex
  2. 4
      apps/indexer/lib/indexer/coin_balance/fetcher.ex

@ -46,9 +46,9 @@ defmodule Indexer.Block.Catchup.Fetcher do
`#{@blocks_batch_size}`. Block requests also include the transactions for those blocks. *These transactions `#{@blocks_batch_size}`. Block requests also include the transactions for those blocks. *These transactions
are not paginated.* are not paginated.*
* `:blocks_concurrency` - The number of concurrent requests of `:blocks_batch_size` to allow against the JSONRPC. * `:blocks_concurrency` - The number of concurrent requests of `:blocks_batch_size` to allow against the JSONRPC.
Defaults to #{@blocks_concurrency}. So upto `blocks_concurrency * block_batch_size` (defaults to Defaults to #{@blocks_concurrency}. So, up to `blocks_concurrency * block_batch_size` (defaults to
`#{@blocks_concurrency * @blocks_batch_size}`) blocks can be requested from the JSONRPC at once over all `#{@blocks_concurrency * @blocks_batch_size}`) blocks can be requested from the JSONRPC at once over all
connections. Upto `block_concurrency * receipts_batch_size * receipts_concurrency` (defaults to connections. Up to `block_concurrency * receipts_batch_size * receipts_concurrency` (defaults to
`#{ `#{
@blocks_concurrency * Block.Fetcher.default_receipts_batch_size() * Block.Fetcher.default_receipts_batch_size() @blocks_concurrency * Block.Fetcher.default_receipts_batch_size() * Block.Fetcher.default_receipts_batch_size()
}` }`

@ -106,8 +106,8 @@ defmodule Indexer.CoinBalance.Fetcher do
|> Enum.group_by(fn %{address_hash: address_hash} -> address_hash end) |> Enum.group_by(fn %{address_hash: address_hash} -> address_hash end)
|> Map.values() |> Map.values()
|> Stream.map(&Enum.max_by(&1, fn %{block_number: block_number} -> block_number end)) |> Stream.map(&Enum.max_by(&1, fn %{block_number: block_number} -> block_number end))
|> Enum.map(fn %{address_hash: addresss_hash, block_number: block_number, value: value} -> |> Enum.map(fn %{address_hash: address_hash, block_number: block_number, value: value} ->
%{hash: addresss_hash, fetched_coin_balance_block_number: block_number, fetched_coin_balance: value} %{hash: address_hash, fetched_coin_balance_block_number: block_number, fetched_coin_balance: value}
end) end)
end end
end end

Loading…
Cancel
Save