-
Notifications
You must be signed in to change notification settings - Fork 266
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: consider the referenced nodes in traverseNodes
#724
Conversation
da7587a
to
e0e1523
Compare
@catShaark |
I agree its definitely better to use |
which pr do we keep open? this or catsharks? |
this PR introduces some extra cleaning-ups, let's move with @catShaark first |
@@ -511,6 +511,15 @@ func (ndb *nodeDB) HasVersion(version int64) (bool, error) { | |||
return ndb.db.Has(nodeKeyFormat.Key(version, []byte{1})) | |||
} | |||
|
|||
func isReferenceToRoot(bz []byte) bool { | |||
if bz[0] == nodeKeyFormat.Prefix()[0] { | |||
if len(bz) == 13 { |
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.
It seems the condition for a referenced node is hacky, I think we should add a prefix to normal node values as well, so we can distinguish with prefix alone.
Closes: #718