Prevent users from mining before node is synced #160

Open
opened 2 months ago by duke · 1 comments
duke commented 2 months ago
Owner

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
duke added the
feature
label 2 months ago
Poster
Owner

I started a branch no_mining_until_synced to work on this

I started a branch `no_mining_until_synced` to work on this
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.