-
Notifications
You must be signed in to change notification settings - Fork 121
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
Check for existing asset in db before attempting to insert a new asset. #687
Conversation
This commit extends the QueryAssets SQL query with ID field filtering for anchored UTXO, genesis, and script key.
71f9969
to
a51368f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Confirmed that the itest does test this issue of displayed balance.
Sounds like another angle for a fix is to have the custodian not perform these duplicate proof fetches on restart in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
@jharveyb yes, I would like to refactor the custodian in another PR. It doesn't handle the events cache very cleanly. |
Yep, this also needs to be resolved. We have some candidate fixes in mind, and can exercise the fixes at the unit test level. |
This PR is another solution for #665 .
In these commits we add a check to ensure that if a confirmed asset already exists in our db we do not attempt to insert another copy.
This solution is a better solution than #684 because it is simpler and less risky.