Support unlimited number of external rewards

pull/3291/head
Victor Baranov 4 years ago
parent d75aab81bb
commit d483f823c3
  1. 1
      CHANGELOG.md
  2. 20
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/besu/fetched_beneficiaries.ex

@ -10,6 +10,7 @@
- [#3261](https://github.com/poanetwork/blockscout/pull/3261) - Bridged tokens table
### Fixes
- [#3291](https://github.com/poanetwork/blockscout/pull/3291) - Support unlimited number of external rewards in block
- [#3290](https://github.com/poanetwork/blockscout/pull/3290) - Eliminate protocol Jason.Encoder not implemented for... error
- [#3284](https://github.com/poanetwork/blockscout/pull/3284) - Fix fetch_coin_balance query: coin balance delta
- [#3276](https://github.com/poanetwork/blockscout/pull/3276) - Bridged tokens status/metadata fetcher refactoring

@ -171,25 +171,7 @@ defmodule EthereumJSONRPC.Besu.FetchedBeneficiaries do
# The rewardType "uncle" will show reward for validating an uncle block
defp get_address_type(reward_type, index) when reward_type == "external" and index == 0, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 1, do: :emission_funds
defp get_address_type(reward_type, index) when reward_type == "external" and index == 2, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 3, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 4, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 5, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 6, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 7, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 8, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 9, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 10, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 11, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 12, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 13, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 14, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 15, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 16, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 17, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 18, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 19, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index == 20, do: :validator
defp get_address_type(reward_type, index) when reward_type == "external" and index > 2, do: :validator
defp get_address_type(reward_type, _index) when reward_type == "block", do: :validator
defp get_address_type(reward_type, _index) when reward_type == "uncle", do: :uncle
defp get_address_type(reward_type, _index) when reward_type == "emptyStep", do: :validator

Loading…
Cancel
Save