Skip to content

Conversation

@epineapple
Copy link

This command allows for the collection of statistics at any time, instead of waiting until submitting results.

This command is not currently used. The function that uses this command is coming in a different pull request.

This command allows for the collection of statistics at any time,
instead of waiting until submitting results.
Add notification channels for the current hash rate and for submissions.
This goroutine and these notification channels allow programs to provide
users with current statistics.
@epineapple
Copy link
Author

With the ReportHashRate goroutine, client programs which want to report current statistics to users can provide *NotificationChannels when calling stratum.NewClient.

@Emyrk
Copy link
Collaborator

Emyrk commented Feb 14, 2020

I'll get to this today. thanks for the contribution

@Emyrk
Copy link
Collaborator

Emyrk commented Feb 16, 2020

@epineapple Is this PR complete? The new clients are always initialized with a nil. So the feature is always off.

Is there something you need from me or want me to review before you continue?

@epineapple
Copy link
Author

This PR is complete. The use of it is coming in a second PR, which changes prosper-miner. I'm still working on that PR. It will probably be a few more days.

Thanks!

If `InitMiners` has not completed (because LXRHash is building the 1GB
table file) and the `ReportHashRate` timer is triggered, the
`SendCommand` call dereferences a null pointer.  (It might be a good
idea to add a check in `SendCommand`.)  This change defers starting the
`ReportHashRate` goroutine until the end of `InitMiners`.
@epineapple
Copy link
Author

I've found and fixed a crash pineapple-electric/prosper-pool@891ff3a.

I'll add a console command to expose CurrentHashRate.

I'd like to get some feedback on pegnet/LXRHash#69 and pegnet/LXRHash#70 before I submit the next PR.

Add the "startfeed" and "stopfeed" commands. The feed will print a
message when a share is submitted and print the current hash rate at
regular intervals.
@epineapple
Copy link
Author

You should be able to test this function with the startfeed and stopfeed console commands.

891ff3a fixed a crash by moving a goroutine.  This change fixes
that fix by putting the goroutine outside of the loop.
@epineapple epineapple mentioned this pull request Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants