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-state): remove state=blockchain tag from block state #3828

Merged

Conversation

rainydio
Copy link
Contributor

@rainydio rainydio commented Jun 24, 2020

Summary

Tags got mixed. BlockState was referenced with state=clone, but it itself was using wallet repository with state=blockchain. There are legit cases where one would need access to both wallet repositories. I will try to find a way to make it more difficult to misuse them.

Gonna start on #3798 and replace tags with child containers. So that blockchain wallet repository is default root one. Temp and copy-on-write wallet repositories has to be explicitly created through factory while being in blockchain context. Attempting to get blockchain wallet repository will also require explicit function call that is available only in temp and copy-on-write contexts.

So that one can't mix them by accident, but can mix them explicitly only in specific known cases.

Checklist

  • Tests
  • Ready to be merged

@ghost ghost added Complexity: Low labels Jun 24, 2020
@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #3828 into develop will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3828   +/-   ##
========================================
  Coverage    91.87%   91.88%           
========================================
  Files          620      620           
  Lines        14768    14768           
  Branches      1842     1842           
========================================
+ Hits         13568    13569    +1     
  Misses         939      939           
+ Partials       261      260    -1     
Flag Coverage Δ
#functional 6.10% <ø> (ø)
#integration 9.60% <ø> (ø)
#unit 89.93% <ø> (+<0.01%) ⬆️
Impacted Files Coverage Δ
packages/core-state/src/block-state.ts 100.00% <ø> (ø)
packages/core-p2p/src/network-monitor.ts 98.05% <0.00%> (+0.38%) ⬆️

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 7e369b1...6aaa934. Read the comment docs.

@rainydio rainydio marked this pull request as ready for review June 24, 2020 15:01
@air1one air1one merged commit 8d64939 into develop Jun 24, 2020
@ghost ghost deleted the fix/core-state/block-state/remove-state-blockchain-tag branch June 24, 2020 15:50
@ghost ghost removed the Status: Needs Review label Jun 24, 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.

2 participants