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 anchor cache bug #1928

Merged
merged 2 commits into from
Dec 8, 2016
Merged

Fix anchor cache bug #1928

merged 2 commits into from
Dec 8, 2016

Conversation

ebfull
Copy link
Contributor

@ebfull ebfull commented Dec 7, 2016

Fixes #1912.

If an anchor is removed from the cache, but didn't exist in it beforehand, it will insert a blank tree. If it's reinserted in a child cache, when the child cache flushes it will mark the treestate as entered but won't bring the valid tree with it.

Thankfully, we assert when connecting blocks so that this inconsistency won't cause us to build on a blank tree after a reorg.

@ebfull ebfull added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2016
@bitcartel
Copy link
Contributor

ACK

@str4d str4d added this to the 1.0.4 milestone Dec 8, 2016
@str4d
Copy link
Contributor

str4d commented Dec 8, 2016

ACK

@zkbot r+

@zkbot
Copy link
Contributor

zkbot commented Dec 8, 2016

📌 Commit ebd9aa1 has been approved by str4d

@zkbot
Copy link
Contributor

zkbot commented Dec 8, 2016

⌛ Testing commit ebd9aa1 with merge cdbd851...

zkbot pushed a commit that referenced this pull request Dec 8, 2016
Fix anchor cache bug

Fixes #1912.

If an anchor is removed from the cache, but didn't exist in it beforehand, it will insert a blank tree. If it's reinserted in a child cache, when the child cache flushes it will mark the treestate as entered but won't bring the valid tree with it.

Thankfully, we assert when connecting blocks so that this inconsistency won't cause us to build on a blank tree after a reorg.
@str4d str4d added C-bug Category: This is a bug and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 8, 2016
@zkbot
Copy link
Contributor

zkbot commented Dec 8, 2016

☀️ Test successful - zcash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants