-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fc4ae93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask what the purpose is of dt % 12 == 11?
fc4ae93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp is incremented by 12 farther below to generate new cached work, and the miner is only allowed to roll it 10 times due to the header being "expire=10". Therefore, we'll only get this condition triggered if a miner rolls its timestamp more than 10 seconds.
fc4ae93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now seen an example of dt=35 triggering the message (after extending the log message). That seems wierd to me. Wouldn't dt>10 be more appropriate?
On the other hand I don't understand the 12 second increment either.
fc4ae93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is gone now, as I was assuming that expire=10 meant that the miner could only roll the work 10 times. Now, P2Pool just rolls the work 120 seconds and hopes the miner doesn't go that far in the 10 seconds it's given by the expire=10 header.