While initiating mining is allowed by the full node before the node is synced, it can cause all kinds of problems and usually should not be done. The GUI should prevent users from mining before the node syncs, because usually this causes people to mine their own chainforks and is very confusing for new users.
Here is how I think this feature should work:
The GUI mining tab still is enabled and lets a user click "Start Mining" even if the node is not synced
If the node is not fully synced, it pops up a modal window which says something like "Mining will begin once your node is synced" with an OK button
A timer starts, which checks if the node is synced, something like once per minute. We can used the synced key from getinfo
Once the node is synced, the normal calls to setgenerate are done to begin mining and the statusBar can be updated with a message about mining has started
While initiating mining is allowed by the full node before the node is synced, it can cause all kinds of problems and usually should not be done. The GUI should prevent users from mining before the node syncs, because usually this causes people to mine their own chainforks and is very confusing for new users.
Here is how I think this feature should work:
* The GUI mining tab still is enabled and lets a user click "Start Mining" even if the node is not synced
* If the node is not fully synced, it pops up a modal window which says something like "Mining will begin once your node is synced" with an OK button
* A timer starts, which checks if the node is synced, something like once per minute. We can used the `synced` key from `getinfo`
* Once the node is synced, the normal calls to `setgenerate` are done to begin mining and the statusBar can be updated with a message about mining has started
While initiating mining is allowed by the full node before the node is synced, it can cause all kinds of problems and usually should not be done. The GUI should prevent users from mining before the node syncs, because usually this causes people to mine their own chainforks and is very confusing for new users.
Here is how I think this feature should work:
synced
key fromgetinfo
setgenerate
are done to begin mining and the statusBar can be updated with a message about mining has startedI started a branch
no_mining_until_synced
to work on this