Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix coin balance params reducer for pending transaction #1516

Merged
merged 5 commits into from
Mar 4, 2019

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Mar 4, 2019

Motivation

We can't extract params from logs params of pending transactions

2019-03-03T18:15:54.317 [error] Task #PID<0.8286.0> started from Indexer.Block.Realtime.Fetcher terminating
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Indexer.Address.CoinBalances.reducer/2
    (indexer) lib/indexer/address/coin_balances.ex:32: anonymous fn(%{address_hash: "0xdac17f958d2ee523a2206206994597c13d831ec7", block_number: nil, data: "0x00000000000000000000000000000000000000000000000000000000007839b0", first_topic: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", fourth_topic: nil, index: nil, second_topic: "0x00000000000000000000000048686372756193c2663d1081c35d3d48e022c5fa", third_topic: "0x000000000000000000000000a5b1a8d0d45fc9729cc3f57c4f5b8c35da14d6f5", transaction_hash: nil, type: "pending"}) in Indexer.Address.CoinBalances.reducer/2

Changelog

  • fix coin balance params reducer for pending transaction

@ghost ghost assigned ayrat555 Mar 4, 2019
@ghost ghost added the in progress label Mar 4, 2019
@coveralls
Copy link

coveralls commented Mar 4, 2019

Pull Request Test Coverage Report for Build 77620a59-7290-411c-9554-c42e2f7943fb

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 84.732%

Totals Coverage Status
Change from base Build 45447395-7b96-46a0-9691-141b5a5ed448: 0.06%
Covered Lines: 4262
Relevant Lines: 5030

💛 - Coveralls

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -29,10 +29,17 @@ defmodule Indexer.Address.CoinBalances do

defp reducer({:logs_params, logs_params}, acc) when is_list(logs_params) do
# a log MUST have and address_hash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is missing in this comment. I suppose it should be "a log MUST have address_hash and block_number"

@ghost ghost assigned vbaranov Mar 4, 2019
@vbaranov vbaranov merged commit 9164018 into master Mar 4, 2019
@vbaranov vbaranov deleted the ab-fix-coin-balance-reducer-coin-balance branch March 4, 2019 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants