-
Notifications
You must be signed in to change notification settings - Fork 62
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
fix: reduce mine period reset (waiting) time #735
Conversation
@@ -290,6 +291,7 @@ func (self *worker) update() { | |||
} | |||
}() | |||
for { | |||
prevReset0TimeMillisec := int64(0) |
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 is called by value not a pointer/reference.
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.
changed to by pointer
miner/worker.go
Outdated
// in case it resets to 0 in one millisecond too many times, we wait for mine period | ||
resetTime = minePeriodDuration | ||
} else { | ||
prevReset0TimeMillisec = nowTime |
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.
prevReset0TimeMillisec won't got reserved as this is called by value.
502edac
to
fb82016
Compare
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
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