-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increate timeout to 1 min for testnet #746
Conversation
* fix: reduce mine period reset (waiting) time * fix: reset time negative problem * fix: too many time reset=0, and change log level * update log format --------- Co-authored-by: liam.lai <liam.lai@us>
increate timeout to 1 min for testnet fix test and update log level
b5ca27b
to
ce9bc9f
Compare
@@ -302,12 +304,14 @@ func (w *worker) update() { | |||
if atomic.LoadInt32(&w.mining) == 1 { | |||
w.commitNewWork() | |||
} | |||
timeout.Reset(time.Duration(minePeriod) * time.Second) | |||
resetTime := getResetTime(w.chain, minePeriod, &prevReset0TimeMillisec) | |||
timeout.Reset(resetTime) |
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.
Reset should always be invoked on stopped or expired channels
|
||
// Handle ChainHeadEvent | ||
case <-w.chainHeadCh: | ||
w.commitNewWork() | ||
timeout.Reset(time.Duration(minePeriod) * time.Second) | ||
resetTime := getResetTime(w.chain, minePeriod, &prevReset0TimeMillisec) | ||
timeout.Reset(resetTime) |
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.
Reset should be invoked only on stopped or expired timers with drained channels
will raise another pr to fix this. good feedback! |
Proposed changes
Merge from master branch with mining time fix and vote fix
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅
in the boxes that applyImpacted Components
Which part of the codebase this PR will touch base on,
Put an
✅
in the boxes that applyChecklist
Put an
✅
in the boxes once you have confirmed below actions (or provide reasons on not doing so) that