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(trie): delete nonexistent keys from DB #10

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

yejiayu
Copy link
Contributor

@yejiayu yejiayu commented Feb 1, 2019

No description provided.

@yejiayu yejiayu added the bug Something isn't working label Feb 1, 2019
@u2
Copy link
Contributor

u2 commented Feb 1, 2019

So this PR fixed two bugs? firstly, fixed the delete operation of the nonexistent keys; secondly, fixed the delete keys in DB.

@yejiayu
Copy link
Contributor Author

yejiayu commented Feb 1, 2019

Only fixed one, delete a node that does not exist from the database when calling commit

@yejiayu yejiayu merged commit d9efba7 into citahub:master Feb 1, 2019
@u2
Copy link
Contributor

u2 commented Feb 1, 2019

        for key in self.deleted_keys.drain(..) {
            self.db.remove(key.as_ref()).map_err(TrieError::DB)?;
        }

I think not just one. Maybe I misunderstood it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants