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 read contract and change tx count #6309

Merged
merged 3 commits into from
Oct 24, 2022

Conversation

nikitosing
Copy link
Member

@nikitosing nikitosing commented Oct 20, 2022

Close #5738
Close #5518

Changelog

  • Address txs count now counts all txs on address
  • Fix backward compatibility issue with smart contract interaction

Checklist for your Pull Request (PR)

…bility issue with smart contract interaction
@nikitosing nikitosing changed the title Address txs count now counts all txs on address; Fix backward compati… Fix read contract and change tx count Oct 20, 2022
@nikitosing nikitosing requested a review from vbaranov October 20, 2022 08:33
@@ -962,6 +962,17 @@ defmodule Explorer.Chain do
Repo.aggregate(to_address_query, :count, :hash, timeout: :infinity)
end

@spec address_hash_to_transaction_count(Hash.Address.t()) :: non_neg_integer()
def address_hash_to_transaction_count(address_hash) do
Copy link
Member

Choose a reason for hiding this comment

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

The naming is incorrect. Since it accounts all transactions on address (to/from), I would suggest changing the naming of the function to address_hash_all_transaction_count

@@ -2447,17 +2458,7 @@ defmodule Explorer.Chain do

@spec address_to_transaction_count(Address.t()) :: non_neg_integer()
def address_to_transaction_count(address) do
Copy link
Member

Choose a reason for hiding this comment

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

It is worth changing the naming of the function since now it accounts all transactions on the address.

vbaranov
vbaranov previously approved these changes Oct 22, 2022
@vbaranov vbaranov dismissed their stale review October 22, 2022 15:51

Some functions still should be re-named (see review comments)

@vbaranov vbaranov self-requested a review October 24, 2022 08:43
@vbaranov vbaranov merged commit bf120dc into master Oct 24, 2022
@vbaranov vbaranov deleted the np-fix-tx-count-and-read-contract branch May 9, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants