Merge pull request #5212 from blockscout/np-fix-gas-used

Drop gas_used from first_trace
pull/4862/head
Victor Baranov 3 years ago committed by GitHub
commit db97ddcaa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex

@ -7,6 +7,7 @@
- [#4690](https://github.com/blockscout/blockscout/pull/4690) - Improve pagination: introduce pagination with random access to pages; Integrate it to the Transactions List page
### Fixes
- [#5212](https://github.com/blockscout/blockscout/pull/5212) - Fix `gas_used` value bug
- [#5196](https://github.com/blockscout/blockscout/pull/5196) - Various Docker setup fixes
- [#5192](https://github.com/blockscout/blockscout/pull/5192) - Fix DATABASE_URL config parser
- [#5191](https://github.com/blockscout/blockscout/pull/5191) - Add empty view for new addresses

@ -597,14 +597,10 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactions do
)
set_with_gas_used =
if first_trace.gas_used do
Keyword.put_new(set, :gas_used, first_trace.gas_used)
if transaction_receipt_from_node && transaction_receipt_from_node.gas_used do
Keyword.put_new(set, :gas_used, transaction_receipt_from_node.gas_used)
else
if transaction_receipt_from_node && transaction_receipt_from_node.gas_used do
Keyword.put_new(set, :gas_used, transaction_receipt_from_node.gas_used)
else
set
end
set
end
filtered_set = Enum.reject(set_with_gas_used, fn {_key, value} -> is_nil(value) end)

Loading…
Cancel
Save