Skip to content
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

Merged
merged 2 commits into from
Jun 11, 2019
Merged

Conversation

ShengguangXiao
Copy link
Contributor

@ShengguangXiao ShengguangXiao commented Jun 6, 2019

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

  • This is not a breaking change
  • This is a breaking change

Review Suggestion

Status

Implementation

  • ready for review

Integration Test (Core Team)

  • local machine test
  • small-scale cloud test

@ShengguangXiao ShengguangXiao self-assigned this Jun 6, 2019
@ShengguangXiao ShengguangXiao added the Ready Ready for review label Jun 6, 2019
@codecov-io
Copy link

codecov-io commented Jun 6, 2019

Codecov Report

Merging #1683 into master will increase coverage by <.01%.
The diff coverage is 16.66%.

@@            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
Impacted Files Coverage Δ
src/common/Constants.h 100% <ø> (ø) ⬆️
src/libPOW/pow.cpp 39.69% <0%> (-0.79%) ⬇️
src/common/Constants.cpp 99.75% <100%> (ø) ⬆️
src/libUtils/SWInfo.cpp 93.12% <0%> (+2.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1189fb3...41effdc. Read the comment docs.

@@ -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;
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think can

@ansnunez ansnunez merged commit b0c23ec into master Jun 11, 2019
@ShengguangXiao ShengguangXiao deleted the fix/retry_send_pow branch July 8, 2019 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants