-
Notifications
You must be signed in to change notification settings - Fork 471
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
ledger: move iterators into a store package (10 of N) #4874
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4874 +/- ##
==========================================
- Coverage 54.01% 53.57% -0.45%
==========================================
Files 426 429 +3
Lines 53425 53426 +1
==========================================
- Hits 28859 28624 -235
- Misses 22305 22573 +268
+ Partials 2261 2229 -32
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
33fae92
to
c3bc2b9
Compare
top level package 'encoded' makes me wonder what encoded? maybe |
@brianolson they are mostly used in catchpoints, but leak on some of the db interfaces. |
8ef5655
to
69a9144
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.
LGTM
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.
Please fix err=nil
in loadOld, and maybe rename encoded
?
@@ -166,6 +167,14 @@ type catchpointCatchupAccessorImpl struct { | |||
nextExpectedAccount basics.Address | |||
} | |||
|
|||
// catchpointAccountResourceCounter keeps track of the resources processed for the current account |
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.
there is a copy in store/encodedAccountsIter.go
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.
Yes, it's an accumulator used during iteration.
It seemed strange to export the type from store since it makes more sense for it to live here.
Summary
This PR creates a few more methods needed by the deltas.
Previous parts of this refactor:
What remains to be moved out:
orderedAccountsIter
catchpointPendingHashesIterator
accountsLoadOld
andresourcesLoadOld
have a couple queries that we might want to move out to avoid pulling all the deltas into storeledger
acctdeltas_test.go
acctupdates_test.go
catchpointtracker.go
catchpointwriter.go
catchpointwriter_test.go
Test Plan
Existing tests.