Skip to content
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

client/db: add account backup and restore. #210

Merged
merged 2 commits into from Mar 25, 2020
Merged

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Mar 19, 2020

This adds AccountBackup type for backup and restore functionality for user accounts.

RandomWallet has also been updated to use the current time for balance update times to fix an issue with TestWallets.

Resolves #179.

client/db/bolt/db_test.go Outdated Show resolved Hide resolved
Copy link
Member

@buck54321 buck54321 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost exactly what I had in mind, but I do want to standardize this format at the level of the client/db package. So probably a type dexdb.AccountBackup which has a Serialize() []byte method. This ensures that the backup can be imported into a different database backend in the future.

@dnldd dnldd closed this Mar 22, 2020
@dnldd dnldd reopened this Mar 22, 2020
@dnldd dnldd changed the title bolt: add account backup and restore. client/db: add account backup and restore. Mar 22, 2020
client/db/test/dbtest.go Outdated Show resolved Hide resolved
Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small tweak for me. @buck54321 might have other suggestions.

Also, please try not to squash commits during review. Even after the PR is approved it's not necessary to squash since I just do it. Review is way easier if we see all the incremental diffs.

client/db/test/dbtest.go Outdated Show resolved Hide resolved
This adds AccountBackup type for backup and restore functionality for
user accounts.

RandomWallet has also been updated to use the current
time for balance update times to fix an issue with TestWallets.
@chappjc chappjc merged commit 0a36e50 into decred:master Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

client: data backup
3 participants