-
Notifications
You must be signed in to change notification settings - Fork 370
Activate Local Snapshots #1172
Activate Local Snapshots #1172
Conversation
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.
Good
Just a few changes
|
||
public final AsyncTransactionPruner transactionPruner; | ||
|
||
public final MilestoneSolidifierImpl milestoneSolidifier; |
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.
All the Impls
should be removed.
This is because: The D
in Solid states that the code should depend on abstractions, not concretions.
The Impl
is sort of a feature that help you enforce D
. Everytime you see it you know D
breaks. Besides it is ugly so it incentivizes you to use the interface :-)
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.
This is so we can use all the implementation specific methods like "init", "start" and so on without having to typecast them to their explicit type again. I could have the field be generic and then do
((MilestoneSolidifierImpl) milestoneSolidifier).init(...) but that kind of makes it more complicated imho
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.
hmm
Once we will do proper DI we will fix it
For now it is fine
src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java
Outdated
Show resolved
Hide resolved
…pl.java Co-Authored-By: hmoog <hm@mkjc.net>
Description
This PR replaces the refactored classes and activates local snapshots. It is not the last PR, yet since we want to integrate the missing repair routine and the requester thread but local snapshots should be fully functional already.
Type of change
Checklist:
Please delete items that are not relevant.