-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement import and export functions in modules #1848
Conversation
I think the export/import should stay as close as possible to the database we use. Here we are losing the key on all export. We usually use the hash but we might change to the address or anything. We shouldn't loose this information. I would recommend to switch to a map instead of array or an array of key/value |
As you say, the keys are the hash. If the data didn't contain keys, then a map can be implemented, but it's not the case. |
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.
I'm ok with the fact to store just the data and not the indexes, for now it's sufficient and it might be much more complicated to store both with maybe an iterator on the keeper.
Just a small feedback, not blocking but might just be nicer.
Now the genesis contains empty array instead of null.
After:
|
Closes #1847
This PR implements the import and export functions in modules.
To export, use the command:
To import, copy the output of previous command in the genesis.json file of a new node that doesn't have any database, start the node, and see the data are present.