NebulousLabs / Sia

Blockchain-based marketplace for file storage. Project has moved to GitLab: https://gitlab.com/NebulousLabs/Sia
https://sia.tech
MIT License
2.71k stars 442 forks source link

Nondescript response when trying to initialize a wallet from seed when another scan is underway #3156

Open Shatnerz opened 5 years ago

Shatnerz commented 5 years ago

BUG REPORT

I am trying to force a wallet init from a seed. My first attempt timed out so I immediately tried again. The error message (below) is saying the wallet has not been encrypted yet, but I think the issue is due to the fact the the daemon is currently initializing another wallet. This is noticeable when I go to unlock the wallet via siac and get

Could not unlock wallet: error when calling /wallet/unlock: another wallet rescan is already underway

I would expect the error message from the init-seed call to be a little more descriptive, as the stated error does not seem accurate.

Note: all my interactions with the daemon are via sia.js

Stack Trace or error message

{ message: 'error when calling /wallet/init/seed: wallet has not been encrypted yet' }

Expected Behavior

Something along the lines of

 { message: 'error when calling /wallet/unlock: another wallet rescan is already underway' }

How to reproduce it (as minimally and precisely as possible) Try 2 wallet/init/seed calls back to back and do not wait for the first to finish.

Environment