-
Notifications
You must be signed in to change notification settings - Fork 280
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
Add retry mechanism for send pow to proxy #1683
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1683 +/- ##
==========================================
+ Coverage 33.57% 33.58% +<.01%
==========================================
Files 270 270
Lines 32991 33002 +11
==========================================
+ Hits 11078 11083 +5
- Misses 21913 21919 +6
Continue to review full report at Codecov.
|
src/libPOW/pow.cpp
Outdated
@@ -387,7 +387,20 @@ ethash_mining_result_t POW::RemoteMine(const PairOfKey& pairOfKey, | |||
m_shouldMine = true; | |||
|
|||
ethash_mining_result_t miningResult{"", "", 0, false}; | |||
if (!SendWorkToProxy(pairOfKey, blockNum, headerHash, boundary, timeWindow)) { | |||
const int MAX_RETRY_SEND_TIME = 5; |
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.
Should we move this to constants.xml?
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 think can
a31393d
to
25dceba
Compare
3c882e2
to
41effdc
Compare
Description
Some times because network issue, the pow request failed to send to proxy, have a retry mechanism will have more chance to success.
#1681
Backward Compatibility
Review Suggestion
Status
Implementation
Integration Test (Core Team)