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. 4
      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 - [#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 ### 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 - [#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 - [#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 - [#5191](https://github.com/blockscout/blockscout/pull/5191) - Add empty view for new addresses

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

Loading…
Cancel
Save