-
Notifications
You must be signed in to change notification settings - Fork 110
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
chore(all): dependency inject databases and tables #2994
Conversation
8f14659
to
e5cd562
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #2994 +/- ##
===============================================
+ Coverage 51.50% 51.78% +0.27%
===============================================
Files 221 221
Lines 28281 28267 -14
===============================================
+ Hits 14566 14637 +71
+ Misses 12399 12306 -93
- Partials 1316 1324 +8 |
c6e9924
to
d08d1da
Compare
2368954
to
f9c6efb
Compare
67d3a5c
to
2376b3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need to merge this PR if you're going to be swapping out the DB entirely.
Since we dependency inject the database/tables as locally-defined interfaces, it means there will be less changes to be made (no need to repeat update database/table constructors) |
2376b3a
to
c15683e
Compare
c15683e
to
116e766
Compare
dd734d6
to
3aa7008
Compare
3aa7008
to
7c8234f
Compare
7c8234f
to
9458d4e
Compare
- Use in memory database when amount is not big (`TestTrieDiff`) - Do not create unneeded `trie` table in `lib/trie`'s `newTestDB` - `dot/state`: use `t.TempDir()` as data dir directly
67c1c07
to
7d33f1a
Compare
I can't push to this branch, it would be nice if someone can pick it up and git checkout development
git pull
git checkout qdm12/dep-inject-db
git rebase development
git push -f Thanksss |
Changes
Improves codebase health + simplify migration to newer database interface
storeInitialValues
createRuntimeStorage
NewGrandpaState
NewEpochStateFromGenesis
NewEpochState
NewGrandpaStateFromGenesis
NewBlockStateFromGenesis
NewBlockState
LoadChainDB
,LoadBadgerDB
,runtime.NewInMemoryDB
andutils.SetupDatabase
,newInMemoryGrandpaDatabase
newInMemoryDB
test only.Close()
no error assertions.Close()
callsTestTrieDiff
)trie
table inlib/trie
'snewTestDB
dot/state
: uset.TempDir()
as data dir directlyTests
Issues
Fixes #2981
Primary Reviewer