OpenFusionist's blockscout fork diff

+8
-1

These are some really important code modifications in the fork. The original can be found at github.com/blockscout/blockscout. And the fork at OpenFusionist/blockscout/.

Support for nodes without the ‘safe’ tag.

diff --git blockscout/blockscout/apps/indexer/lib/indexer/fetcher/optimism.ex OpenFusionist/blockscout/apps/indexer/lib/indexer/fetcher/optimism.ex index a1b45de11def969be69c284ae70c17574aede779..4c5b60e92bcff21ee313446f90e720620453ee4d 100644 --- blockscout/blockscout/apps/indexer/lib/indexer/fetcher/optimism.ex +++ OpenFusionist/blockscout/apps/indexer/lib/indexer/fetcher/optimism.ex @@ -115,7 +115,14 @@ end   def get_block_number_by_tag(tag, json_rpc_named_arguments, retries \\ 3) do error_message = &"Cannot fetch #{tag} block number. Error: #{inspect(&1)}" - repeated_call(&fetch_block_number_by_tag_op_version/2, [tag, json_rpc_named_arguments], error_message, retries) + # repeated_call(&fetch_block_number_by_tag_op_version/2, [tag, json_rpc_named_arguments], error_message, retries) + actual_tag = if tag == "safe", do: "latest", else: tag + case repeated_call(&fetch_block_number_by_tag_op_version/2, [actual_tag, json_rpc_named_arguments], error_message, retries) do + {:ok, block_number} when tag == "safe" -> + {:ok, block_number - 10} + other -> + other + end end   defp get_block_timestamp_by_number_inner(number, json_rpc_named_arguments) do