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-database): order transactions by sequence on block save #3900

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

sebastijankuzner
Copy link
Contributor

Summary

This PR solves issue that occurs while syncing blocks from another mainnet peer. Some transactions have order exceptions and needs to be re-ordered by sequence number to be accepted by database.

Checklist

  • Ready to be merged

@codecov
Copy link

codecov bot commented Jul 20, 2020

Codecov Report

Merging #3900 into develop will increase coverage by 83.84%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #3900       +/-   ##
============================================
+ Coverage    13.67%   97.52%   +83.84%     
============================================
  Files          628      628               
  Lines        14527    14528        +1     
  Branches      1728     1728               
============================================
+ Hits          1987    14168    +12181     
+ Misses       12425      171    -12254     
- Partials       115      189       +74     
Flag Coverage Δ
#functional 6.76% <100.00%> (+<0.01%) ⬆️
#integration 9.83% <0.00%> (-0.01%) ⬇️
#unit 95.75% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...core-database/src/repositories/block-repository.ts 96.92% <100.00%> (+0.04%) ⬆️
...ore-test-framework/src/app/generators/generator.ts 100.00% <0.00%> (+5.88%) ⬆️
packages/core-test-framework/src/utils/api.ts 97.34% <0.00%> (+6.19%) ⬆️
packages/core-api/src/controllers/locks.ts 100.00% <0.00%> (+9.52%) ⬆️
packages/core-api/src/controllers/delegates.ts 100.00% <0.00%> (+10.81%) ⬆️
...re-test-framework/src/utils/transaction-factory.ts 98.86% <0.00%> (+11.93%) ⬆️
...s/core-test-framework/src/app/generators/crypto.ts 100.00% <0.00%> (+13.13%) ⬆️
packages/core-state/src/state-builder.ts 100.00% <0.00%> (+13.63%) ⬆️
...s/core-api/src/resources/transaction-with-block.ts 100.00% <0.00%> (+15.38%) ⬆️
packages/core-api/src/plugins/rate-limit.ts 100.00% <0.00%> (+16.66%) ⬆️
... and 559 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 f18928d...cf920f7. Read the comment docs.

@air1one air1one merged commit cd29f85 into develop Jul 20, 2020
@ghost ghost deleted the fix/core-database/sort-transactions branch July 20, 2020 14:38
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