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

refactor(core-p2p): replace the network update timeout with a period check #1738

Merged
merged 4 commits into from
Dec 15, 2018

Conversation

faustbrian
Copy link
Contributor

Proposed changes

The whole logic around how the updateNetworkStatusIfNotEnoughPeers method is called is rather odd so it is replaced with a period check instead.

Types of changes

  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

@ghost ghost assigned faustbrian Dec 15, 2018
@ghost ghost added the review label Dec 15, 2018
@codecov-io
Copy link

codecov-io commented Dec 15, 2018

Codecov Report

Merging #1738 into develop will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1738      +/-   ##
===========================================
- Coverage    39.51%   39.48%   -0.03%     
===========================================
  Files          353      353              
  Lines         7671     7673       +2     
  Branches      1079     1098      +19     
===========================================
- Hits          3031     3030       -1     
- Misses        4626     4629       +3     
  Partials        14       14
Impacted Files Coverage Δ
packages/core-blockchain/src/state-machine.ts 43.81% <ø> (-0.29%) ⬇️
packages/core-p2p/src/monitor.ts 0% <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 9c545bc...dc74d83. Read the comment docs.

@ghost ghost assigned spkjp Dec 15, 2018
@spkjp spkjp self-requested a review December 15, 2018 16:45
@spkjp spkjp merged commit e42f4c7 into develop Dec 15, 2018
@ghost ghost removed the review label Dec 15, 2018
@spkjp spkjp deleted the p2p branch December 15, 2018 16:45
spkjp added a commit that referenced this pull request Dec 17, 2018
…ocess queue on fork (#1732)

* refactor: remove misleading log output

* refactor: move block exception check

* fix: reset queue at the beginning of fork recovery

* refactor: drop process queue after disregarding unchained block

* fix: update blocks from current round after recovery

* fix: check if received block contains forged transactions

* refactor: only fork when downloaded block cannot be chained with last accepted block

* refactor: only check forged transactions if it is a chained block

* test: fix

* fix(core-p2p): call updateNetworkStatusIfNotEnoughPeers in the correct context (#1737)

* refactor(core-p2p): replace the network update timeout with a period check (#1738)

* refactor(core-p2p): replace the network update timeout with a period check

* refactor(core-p2p): only sett the last network timeout if it is not set or expired

* chore(core-p2p): remove pTimeout dependency

* refactor: change name and make sure the next network update is scheduled

* chore(package): update better-sqlite3 to version 5.2.0 (#1739)

* test(core-utils): increase coverage (#1742)

* test(core-debugger-cli): increase coverage (#1743)

* chore: update @babel/core and @babel/preset-env (#1740)

* chore(package): update @babel/core to version 7.2.2

* chore(package): update @babel/preset-env to version 7.2.0

* chore(package): update lockfile yarn.lock

* chore: update yarn.lock

* test(crypto): increase identity coverage (#1744)

* test(crypto): increase handler coverage (#1745)

* test(crypto): increase handler coverage (#1746)

* test(crypto): increase multi signature/payment coverage (#1747)

* docs: changelog and readme formatting (#1824)

* refactor: rename resetQueue

* fix: only care about missing blocks when process queue is empty

* refactor: reword log message

* refactor: move fork into function

* fix: accept internal blocks even if in fork state

* fix: dont show peer tracker after init

* refactor: remove useless forked flag
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

3 participants