You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
this._root = this.zeros[0] works when we have an empty tree. But we will have a problem once we have new leaves in the tree and have a non-empty tree root in DB.
When we restart the client and read the root() from the DBTree, we expect to read the non-empty tree root in DB. But here the cached root still returns the empty tree root.
Need to come up with a restoreFromDB function which updates the tree root when the node is restarted. The tree root is already stored in the db and is accessible via getNode(0,0). Rest of the nodes need not be touched.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem
Originally posted by @ChihChengLiang in #619 (comment)
Solution
Need to come up with a
restoreFromDB
function which updates the tree root when the node is restarted. The tree root is already stored in the db and is accessible viagetNode(0,0)
. Rest of the nodes need not be touched.The text was updated successfully, but these errors were encountered: