-
Notifications
You must be signed in to change notification settings - Fork 81
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
wallet: truncate file after writing #2099
Conversation
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.
Who closes the file behind the Wallet, btw?
@roman-khimov file is closed in |
Signed-off-by: Evgeniy Stratonikov <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2099 +/- ##
=======================================
Coverage 84.17% 84.18%
=======================================
Files 288 288
Lines 26994 27002 +8
=======================================
+ Hits 22723 22732 +9
+ Misses 3034 3032 -2
- Partials 1237 1238 +1
Continue to review full report at Codecov.
|
If wallet size decreases, we need to remove trailing garbage if it exists. This can happen when removing account or reading pretty-printed wallet. It doesn't affect our CLI (we decode only file prefix), but it is nice to always have a valid JSON file. Signed-off-by: Evgeniy Stratonikov <[email protected]>
Signed-off-by: Evgeniy Stratonikov <[email protected]>
If wallet size decreases, we need to remove trailing garbage if it
exists. This can happen when removing account or reading pretty-printed
wallet. It doesn't affect our CLI (we decode only file prefix), but
it is nice to always have a valid JSON file.
Signed-off-by: Evgeniy Stratonikov [email protected]