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(core-p2p): check if state is available #2047

Merged
merged 1 commit into from Feb 1, 2019

Conversation

Projects
None yet
4 participants
@supaiku0
Copy link
Contributor

supaiku0 commented Jan 31, 2019

Proposed changes

|ark-core-relay  | Debug: internal, implementation, error
1|ark-core-relay  |     Error: Could not resolve 'state'.
1|ark-core-relay  | Resolution path: state
1|ark-core-relay  |     at method (/home/ark/core/packages/core-p2p/src/server/plugins/accept-request.ts:46:33)
1|ark-core-relay  |     at process._tickCallback (internal/process/next_tick.js:68:7)
1|ark-core-relay  | [2019-01-31 19:17:18][DEBUG]: Rejected peer 5.135.22.95 as it doesn't meet the minimum version requirements. Expected: >=2.1.0 - Received: 2.0.19
1|ark-core-relay  | Debug: internal, implementation, error
1|ark-core-relay  |     Error: Could not resolve 'state'.
1|ark-core-relay  | Resolution path: state
1|ark-core-relay  |     at method (/home/ark/core/packages/core-p2p/src/server/plugins/accept-request.ts:46:33)
1|ark-core-relay  |     at process._tickCallback (internal/process/next_tick.js:68:7)
1|ark-core-relay  | [2019-01-31 19:17:18][DEBUG]: Rejected peer 213.32.41.107 as it doesn't meet the minimum version requirements. Expected: >=2.1.0 - Received: 2.0.19
1|ark-core-relay  | Debug: internal, implementation, error
1|ark-core-relay  |     Error: Could not resolve 'state'.
1|ark-core-relay  | Resolution path: state
1|ark-core-relay  |     at method (/home/ark/core/packages/core-p2p/src/server/plugins/accept-request.ts:46:33)
1|ark-core-relay  |     at process._tickCallback (internal/process/next_tick.js:68:7)
1|ark-core-relay  | [2019-01-31 19:17:18][DEBUG]: Rejected peer 46.105.160.104 as it doesn't meet the minimum version requirements. Expected: >=2.1.0 - Received: 2.0.19
1|ark-core-relay  | Debug: internal, implementation, error

This happens when a node is starting up and a peer is rejected before core-blockchain is up.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

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)

@supaiku0 supaiku0 requested a review from faustbrian Jan 31, 2019

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

ArkEcosystemBot commented Jan 31, 2019

@faustbrian @alexbarnsley - please review this pull request in the next few days. Be sure to explicitly select labels so I know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 31, 2019

Codecov Report

Merging #2047 into develop will increase coverage by <.01%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2047      +/-   ##
===========================================
+ Coverage    73.31%   73.31%   +<.01%     
===========================================
  Files          373      373              
  Lines         8243     8244       +1     
  Branches      1188     1213      +25     
===========================================
+ Hits          6043     6044       +1     
+ Misses        2168     2165       -3     
- Partials        32       35       +3
Impacted Files Coverage Δ
packages/core-p2p/src/court/guard.ts 79.79% <75%> (+0.2%) ⬆️
packages/core-test-utils/src/helpers/container.ts 0% <0%> (ø) ⬆️
packages/core-logger-winston/src/formatter.ts 43.75% <0%> (ø) ⬆️
packages/core-test-utils/src/generators/wallets.ts 14.28% <0%> (ø) ⬆️

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 fd1bb45...733180a. Read the comment docs.

@faustbrian faustbrian merged commit 4bc439a into ArkEcosystem:develop Feb 1, 2019

6 checks passed

ci/circleci: test-node10-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-2 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-2 Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment