Skip to content

fix(core-json-rpc): avoid getting stuck on a unresponsive peer by picking a random one each time#2491

Merged
faustbrian merged 1 commit intomasterfrom
fix/rpc-peers
Apr 30, 2019
Merged

fix(core-json-rpc): avoid getting stuck on a unresponsive peer by picking a random one each time#2491
faustbrian merged 1 commit intomasterfrom
fix/rpc-peers

Conversation

@faustbrian
Copy link
Copy Markdown
Contributor

@faustbrian faustbrian commented Apr 26, 2019

Summary

Select a random peer every time we send a request and try to do so up to 3 times before giving up.

What kind of change does this PR introduce?

  • Bugfix
  • New feature
  • Refactoring / Performance Improvements
  • Build-related changes
  • Documentation
  • Tests / Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
    • All tests are passing
    • All benchmarks are passing without any major regressions
    • Sync from 0 works on mainnet
    • Sync from 0 works on devnet
    • Starting a new network and forging on it work
    • Explorer is fully functional
    • Wallets are fully functional
  • No

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@ghost
Copy link
Copy Markdown

ghost commented Apr 26, 2019

The ci/circleci: test-node11-integration-0 job is failing as of b813ef8bdaaf298f2bbf67a3db96002975434cd4. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 26, 2019

Codecov Report

Merging #2491 into master will increase coverage by 0.03%.
The diff coverage is 88.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2491      +/-   ##
==========================================
+ Coverage   66.07%   66.11%   +0.03%     
==========================================
  Files         400      400              
  Lines        8614     8602      -12     
  Branches      436      436              
==========================================
- Hits         5692     5687       -5     
+ Misses       2877     2870       -7     
  Partials       45       45
Impacted Files Coverage Δ
...ges/core-json-rpc/src/server/services/processor.ts 61.9% <ø> (-3.32%) ⬇️
.../core-json-rpc/src/server/methods/blocks/latest.ts 100% <100%> (ø) ⬆️
...json-rpc/src/server/methods/blocks/transactions.ts 100% <100%> (ø) ⬆️
...n-rpc/src/server/methods/transactions/broadcast.ts 90.9% <100%> (ø) ⬆️
...es/core-json-rpc/src/server/methods/blocks/info.ts 100% <100%> (ø) ⬆️
...e-json-rpc/src/server/methods/transactions/info.ts 100% <100%> (ø) ⬆️
...son-rpc/src/server/methods/wallets/transactions.ts 100% <100%> (ø) ⬆️
...s/core-json-rpc/src/server/methods/wallets/info.ts 100% <100%> (ø) ⬆️
...kages/core-json-rpc/src/server/services/network.ts 87.5% <85%> (+13.69%) ⬆️

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 b74ec6a...b813ef8. Read the comment docs.

@faustbrian faustbrian marked this pull request as ready for review April 29, 2019 12:57
@faustbrian faustbrian changed the title fix(core-json-rpc): avoid getting stuck on a peer by picking a random one each time fix(core-json-rpc): avoid getting stuck on a unresponsive peer by picking a random one each time Apr 29, 2019
@faustbrian faustbrian merged commit d6289e6 into master Apr 30, 2019
@ghost ghost deleted the fix/rpc-peers branch April 30, 2019 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants