Skip to content

fix(core-p2p): check if state is available#2047

Merged
faustbrian merged 1 commit intoArkEcosystem:developfrom
spkjp:fix-reject-peer-exception
Feb 1, 2019
Merged

fix(core-p2p): check if state is available#2047
faustbrian merged 1 commit intoArkEcosystem:developfrom
spkjp:fix-reject-peer-exception

Conversation

@spkjp
Copy link
Copy Markdown
Contributor

@spkjp spkjp 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)

@spkjp spkjp requested a review from faustbrian January 31, 2019 20:26
@ghost
Copy link
Copy Markdown

ghost 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
Copy link
Copy Markdown

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
@ghost ghost removed the Status: Needs Review label Feb 1, 2019
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