[cli_wallet] race condition while saving a wallet could potentially lead to data loss
use case scenario
alice
love to play with Hive via cli_wallet
but also loves to have a lot of windows/consoles open
- starts
cli_wallet
instance[1] - gets distracted curating content through web interface
- starts
cli_wallet
instance[2] -
cli_wallet
instance[2]:set_password xxx
,unlock xxx
,import_key key1
,import_key key2
, closes wallet, goes for lunch - gets back to pc looks at instance[1], closes wallet
so at step 4 wallet will save with two imported keys but at step 5 it will save empty wallet without keys
solution would be to use .lock file in order to make sure that the file won't be overwritten?