-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor(prune): segment trait, receipts impl #4887
Conversation
95ea72e
to
9d0e897
Compare
efe3672
to
16a7cc6
Compare
8f9323a
to
b257d39
Compare
…to alexey/pruner-part-trait
b257d39
to
7268a77
Compare
7268a77
to
3356ddf
Compare
…to alexey/pruner-part-trait
Codecov Report
... and 10 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
great idea, to split all of these,
only doc nits + naming bikeshed
0d624cb
to
fb29d2c
Compare
fb29d2c
to
5b9c420
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, pending @joshieDo
apart from the comment, lgtm and fully supportive |
…to alexey/pruner-part-trait
3f65f6a
to
f45d39e
Compare
9146f15
to
d78e03c
Compare
Problem
pruner.rs
became a huge file with different pruning segments sharing a similar structure and logic. With the addition of headers and transactions pruning for snapshots, it will become even bigger.Solution
Introduce a
Segment
trait insegments/mod.rs
which will be used to call a collection of prune segments fromPruner
, abstracting the common logic. Each segment (such as headers, transactions, receipts, etc.) will implement this trait in a separate file, starting withReceipts
insegments/receipts.rs
as a demonstration.