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

[Refactoring] Prune invalid UTXOs from the coins cache #2226

Merged
merged 6 commits into from
Mar 13, 2021

Conversation

random-zebra
Copy link

Instead of checking every possible spent coin against setInvalidOutPoints (which is rather inefficient), simply prevent the addition of invalid outputs to the coins cache, when they are created (during IBD), and/or prune them at startup.

This way we can just rely on the coins cache during block connection, same as with any other coin (invalid outs are simply non-existent / already-spent).

@random-zebra random-zebra added this to the 5.1.0 milestone Mar 2, 2021
@random-zebra random-zebra self-assigned this Mar 2, 2021
@random-zebra random-zebra force-pushed the 202103_invalid-outs-pruning branch 3 times, most recently from 374d753 to 9c893fb Compare March 4, 2021 00:25
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

code review ACK cdae5b0 .

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK cdae5b0

@furszy furszy merged commit 5efb9e9 into PIVX-Project:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants