Skip to content

refactor(core-blockchain): reset missedBlocks before await call#3598

Merged
faustbrian merged 1 commit into2.6from
refactor/core-blockchain/checkMissingBlocks
Mar 13, 2020
Merged

refactor(core-blockchain): reset missedBlocks before await call#3598
faustbrian merged 1 commit into2.6from
refactor/core-blockchain/checkMissingBlocks

Conversation

@air1one
Copy link
Copy Markdown
Contributor

@air1one air1one commented Mar 13, 2020

Summary

Reset missedBlocks before await call in checkMissingBlocks.

Reason for that is the await call takes a bit of time, during which checkMissingBlocks can be called various times. If missedBlocks is not reset before it, we can end up calling this await checkNetworkHealth() a lot of times for nothing.

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 13, 2020

Codecov Report

Merging #3598 into 2.6 will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##              2.6    #3598   +/-   ##
=======================================
  Coverage   66.06%   66.07%           
=======================================
  Files         441      441           
  Lines       12506    12506           
  Branches     1716     1716           
=======================================
+ Hits         8262     8263    +1     
+ Misses       4211     4210    -1     
  Partials       33       33           
Impacted Files Coverage Δ
packages/core-blockchain/src/blockchain.ts 66.03% <100.00%> (ø)
packages/core-transaction-pool/src/storage.ts 100.00% <0.00%> (+2.50%) ⬆️

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 37c37ed...ebe0c29. Read the comment docs.

@faustbrian faustbrian merged commit 4831c7a into 2.6 Mar 13, 2020
@ghost ghost deleted the refactor/core-blockchain/checkMissingBlocks branch March 13, 2020 13:24
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.

2 participants