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
SaveVersion methods always increase the version of the tree.
I suggest to check the hash before increasing the version, if the hash has not changed, it can simply return the current hash. Something like:
ifbytes.Compare(tree.LastHash, tree.WorkingHash()) ==0) // Not Hash()returntree.LastHash, tree.version, nil
Changing version will cause changing hash and it can cause application thinks that tree has changed which is not true.
UPDATE: WorkingHash() (not Hash()) return current Hash.
The text was updated successfully, but these errors were encountered:
SaveVersion
methods always increase the version of the tree.I suggest to check the hash before increasing the version, if the hash has not changed, it can simply return the current hash. Something like:
Changing version will cause changing hash and it can cause application thinks that tree has changed which is not true.
UPDATE:
WorkingHash()
(notHash()) return current Hash.The text was updated successfully, but these errors were encountered: