Merge pull request #2949 from poanetwork/vb-prevent-fill-pbo-for-rsk-variant

Prevent filling pending_block_operations table for RSK variant
pull/2956/head
Victor Baranov 5 years ago committed by GitHub
commit 130a4084ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      CHANGELOG.md
  2. 4
      apps/explorer/lib/explorer/chain/import/runner/blocks.ex

@ -1,7 +1,7 @@
## Current
### Features
- [#2835](https://github.com/poanetwork/blockscout/pull/2835), [#2871](https://github.com/poanetwork/blockscout/pull/2871), [#2872](https://github.com/poanetwork/blockscout/pull/2872), [#2886](https://github.com/poanetwork/blockscout/pull/2886), [#2925](https://github.com/poanetwork/blockscout/pull/2925), [#2936](https://github.com/poanetwork/blockscout/pull/2936) - Add "block_hash" to logs, token_transfers and internal transactions and "pending blocks operations" approach
- [#2835](https://github.com/poanetwork/blockscout/pull/2835), [#2871](https://github.com/poanetwork/blockscout/pull/2871), [#2872](https://github.com/poanetwork/blockscout/pull/2872), [#2886](https://github.com/poanetwork/blockscout/pull/2886), [#2925](https://github.com/poanetwork/blockscout/pull/2925), [#2936](https://github.com/poanetwork/blockscout/pull/2936), [#2949](https://github.com/poanetwork/blockscout/pull/2949) - Add "block_hash" to logs, token_transfers and internal transactions and "pending blocks operations" approach
- [#2926](https://github.com/poanetwork/blockscout/pull/2926) - API endpoint: sum balances except burnt address
- [#2918](https://github.com/poanetwork/blockscout/pull/2918) - Add tokenID for tokentx API action explicitly

@ -310,6 +310,9 @@ defmodule Explorer.Chain.Import.Runner.Blocks do
end
defp new_pending_operations(repo, nonconsensus_hashes, hashes, %{timeout: timeout, timestamps: timestamps}) do
if Application.get_env(:explorer, :json_rpc_named_arguments)[:variant] == EthereumJSONRPC.RSK do
{:ok, []}
else
sorted_pending_ops =
nonconsensus_hashes
|> MapSet.new()
@ -330,6 +333,7 @@ defmodule Explorer.Chain.Import.Runner.Blocks do
timestamps: timestamps
)
end
end
defp delete_address_token_balances(_, [], _), do: {:ok, []}

Loading…
Cancel
Save