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

feat(core-p2p): forget unresponsive peer #3887

Merged
merged 3 commits into from Jul 13, 2020
Merged

Conversation

sebastijankuzner
Copy link
Contributor

Summary

This PR solves issue #3880 and #3883

Peer will be removed from peer list after 3 (default) sequential unsuccessful responses. Each time peer respond error counter is reset.

CORE_P2P_MAX_PEER_SEQUENTIAL_ERRORS flag is used to increase the limit of unsuccessful responses, which can be useful on networks with quicker block times.

Checklist

  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #3887 into develop will increase coverage by 87.74%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #3887       +/-   ##
============================================
+ Coverage     9.87%   97.61%   +87.74%     
============================================
  Files          618      618               
  Lines        14433    14439        +6     
  Branches      1725     1726        +1     
============================================
+ Hits          1425    14095    +12670     
+ Misses       12902      155    -12747     
- Partials       106      189       +83     
Flag Coverage Δ
#functional 6.75% <0.00%> (?)
#integration 9.87% <11.11%> (+<0.01%) ⬆️
#unit 95.89% <100.00%> (?)
Impacted Files Coverage Δ
packages/core-kernel/src/ioc/identifiers.ts 100.00% <ø> (+100.00%) ⬆️
packages/core-p2p/src/listeners.ts 100.00% <100.00%> (+100.00%) ⬆️
packages/core-p2p/src/peer-communicator.ts 100.00% <100.00%> (+100.00%) ⬆️
packages/core-p2p/src/peer.ts 100.00% <100.00%> (+41.66%) ⬆️
packages/core-p2p/src/service-provider.ts 100.00% <100.00%> (+100.00%) ⬆️
...ore-test-framework/src/app/generators/generator.ts 100.00% <0.00%> (+5.88%) ⬆️
packages/core-test-framework/src/utils/api.ts 97.34% <0.00%> (+6.19%) ⬆️
packages/core-api/src/controllers/locks.ts 100.00% <0.00%> (+9.52%) ⬆️
packages/core-api/src/controllers/delegates.ts 100.00% <0.00%> (+10.81%) ⬆️
...s/core-test-framework/src/app/generators/crypto.ts 100.00% <0.00%> (+13.13%) ⬆️
... and 588 more

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 381e9c7...390ef9e. Read the comment docs.

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.

None yet

2 participants