sumoprojects / SumoGUIWallet

Sumokoin GUI Wallet
Other
38 stars 46 forks source link

not take DB Dir #34

Open 2010phenix opened 6 years ago

2010phenix commented 6 years ago

always upload DB to -C- disk and not use (or maybe am not find correct on) key D:\Sumo002\wallet.exe --data-dir=D:\ProgramData\sumokoin

not work

def getHomeDir(): if sys.platform == 'win32': import winpaths homedir = winpaths.get_common_appdata() # = e.g 'C:\ProgramData'

shah256 commented 6 years ago

I tried to do the same thing and it didn't work for me either. There is a workaround though.

I got it to work by manually starting the command line daemon with the parameter so that it is running in the background as a rpc server:

sumokoind --data-dir=D:\sumokoin

Then start the wallet.exewithout any parameters, which automatically finds the daemon process via rpc.

The wallet client needs updating to allow a database path parameter to be configured, as with other CryptoNote based clients that I have used.

2010phenix commented 6 years ago

@shah256 interesting ))). Thanks man for workaround am try too, but in this huge project Issue not answered !!TWO WEEK and not fix so simple things is strange.

tinola commented 6 years ago

Well, that was also disappointing me... The blockchain database path is indeed hardcoded in Windows to the SYSDRIVE:\Programdata... It sucks :/ What if I haven't free space there?... Another issue - what if I want to save the wallet files in different location than SYSDRIVE:\Users\someuser\appdata\Roaming and so on.....? What if I want save them in for example in R:\Mysecrets\SumoWallet?...

Another thing - sumokoind.exe daemon is starting with wallet GUI, and stopping during close application... In some (or most) cases the sumokoind should run as a service, because if we fire up the wallet GUI, for example twice a week, the daemon will start to sync database wasting some (or a lot) of time to complete the synchronization process... The GUI should has the ability to setup the sumokoind as a service (for example like Monero official GUI does).

Anyway I did the dirty hack to avoid these mandatory (for me) issues :) I created the Windows service (using "sc" command) with customized parameters like --data-dir, --run-as-service and so on, then set to start it automatically with Windows (delayed start), then run it and leave it to work in background. Next I commented out in py sources every call to run sumokoind daemon by GUI and finally corrected paths to save the wallet secret files in my customized location. Compiled then everything to one executable using pyinstaller and guess what?... It works flawesly 🗡 When the GUI wallet is started, it is 100% synchronized with network (thanks to running service in background) and immediately ready to work.

2010phenix commented 6 years ago

@tinola share patch with community? or make pull request? Thx