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

Eliminate duplicates in transactions by address #1397

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

ecioppettini
Copy link
Contributor

Since the transactions by address are recorded in a sequence, and not a set as before (since the pagination was included for this query), it is necessary to eliminate duplicates in inputs and outputs before adding them to the transactions by address index, as an address can be both an input and and output, causing duplicates.

This appears to be the cause of #1384, although it may still be necessary to implement a proper balance method, as the transactions don't include the fee information (I think).

since the transactions by address are recorded in a sequence, and not a
set as before, it is necessary to eliminate duplicates before storing
the indices
@ecioppettini ecioppettini added bug Something isn't working A-explorer Area: Explorer API and backend labels Dec 18, 2019
@ecioppettini ecioppettini self-assigned this Dec 18, 2019
@NicolasDP NicolasDP merged commit a93f015 into master Dec 18, 2019
@NicolasDP NicolasDP deleted the add-transactions-only-once-per-address branch December 18, 2019 22:37
@rinor rinor mentioned this pull request Jan 6, 2020
@NicolasDP
Copy link
Contributor

as the transactions don't include the fee information

of course it does. If you do SUM(INPUTS) - SUM(OUTPUTS) you have the fees of the transaction.

@ecioppettini
Copy link
Contributor Author

as the transactions don't include the fee information

of course it does. If you do SUM(INPUTS) - SUM(OUTPUTS) you have the fees of the transaction.

Oh, sorry. That was a mistake. I was thinking about rewards and not fees

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-explorer Area: Explorer API and backend bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants