should wdb.rescanning be set `true` earlier?
pinheadmz opened this issue · comments
The first step in a rescan process is the "rollback" essentially unconfirming every tx in the wallet's history and rewinding the wallet state back to the rescan point. In a wallet with a lot of TX history, this first step may take a long time. The log may have lots of "Reverting namestate without transaction" and it could take a few seconds before the walletDB height
is actually changed. In addition, the flag wdb.rescanning
does not get set until this point, meaning there are several seconds in which the wallet is actively reverting, but is not indicating a rescanning state, nor is it blocking conflicting actions.
I think we may want to set the flag right away when rescan()
is called.
Lines 486 to 513 in 03a306b