-
Notifications
You must be signed in to change notification settings - Fork 126
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
Serialization support? #13
Comments
@adamgering do you have the specific error? I see a couple potential problems. There is a circular reference between the node and the tree structs that might be causing a problem. We can probably get around this with custom encode/decode functions. The second likely issue is that the hash function is stored on the Cam |
@cbergoon Did you get any further with this issue? I'm trying to serialize and deserialize the tree but I'm getting the circular reference error you mentioned. Great library! |
@pocockn unfortunately I haven't looked into it much more. I will try to spend some time on it this weekend - if the reference can't be removed I'm thinking maybe an intermediate form that would omit the reference and be recalculated. As for the hash function being dynamic we could potentially change this to only support the std lib hash types; this way we do not need the function but just an indicator of which to use. Haven't thought it all the way through yet so if you have suggestions feel free to share. Cam |
Is there a good way to serialize and deserialize the merkle tree?
encoding/gob seems to fail
The text was updated successfully, but these errors were encountered: