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

fix(core-blockchain): pass IBlockData to processBlocks instead of IBlock #3426

Merged
merged 6 commits into from Jan 28, 2020

Conversation

air1one
Copy link
Contributor

@air1one air1one commented Jan 27, 2020

Summary

Pass IBlockData to processBlocks instead of IBlock, to only create instance of IBlock when actually processing the block : this fixes an issue when reaching a new milestone in the middle of the downloaded blocks, as creating instance of IBlock verifies the transactions within it according to the current milestone.

Checklist

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

@ghost ghost added Complexity: Low labels Jan 27, 2020
@air1one air1one marked this pull request as ready for review January 28, 2020 06:57
@codecov
Copy link

codecov bot commented Jan 28, 2020

Codecov Report

Merging #3426 into develop will increase coverage by 16.73%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #3426       +/-   ##
============================================
+ Coverage    49.42%   66.16%   +16.73%     
============================================
  Files          439      439               
  Lines        12444    12444               
  Branches      1702     1702               
============================================
+ Hits          6151     8233     +2082     
+ Misses        6272     4178     -2094     
- Partials        21       33       +12
Impacted Files Coverage Δ
packages/core-blockchain/src/blockchain.ts 66.03% <100%> (ø) ⬆️
packages/crypto/src/transactions/deserializer.ts 92.52% <100%> (ø) ⬆️
packages/crypto/src/transactions/serializer.ts 88.8% <100%> (ø) ⬆️
packages/core-p2p/src/network-monitor.ts 73.46% <0%> (+0.76%) ⬆️
packages/core-state/src/wallets/wallet-manager.ts 90.72% <0%> (+1.61%) ⬆️
packages/core-transaction-pool/src/memory.ts 98.66% <0%> (+2%) ⬆️
...es/core-p2p/src/socket-server/versions/internal.ts 93.18% <0%> (+4.54%) ⬆️
packages/core-transaction-pool/src/connection.ts 91.86% <0%> (+6.09%) ⬆️
packages/core-p2p/src/peer-connector.ts 67.44% <0%> (+6.97%) ⬆️
packages/core-p2p/src/utils/is-valid-version.ts 100% <0%> (+7.14%) ⬆️
... and 131 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 45150f3...91dba12. Read the comment docs.

@faustbrian faustbrian merged commit 117bb9e into develop Jan 28, 2020
@faustbrian faustbrian deleted the fix/core-blockchain/process-blocks branch January 28, 2020 12:40
@ghost ghost removed the Status: Needs Review label Jan 28, 2020
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