Fix condition for external rewards

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

@ -171,7 +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 >= 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