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

Activate Local Snapshots #1172

Merged
merged 15 commits into from Nov 20, 2018

Conversation

Projects
None yet
3 participants
@hmoog
Copy link
Contributor

hmoog commented Nov 20, 2018

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

  • Enhancement (a non-breaking change which adds functionality)

Checklist:

Please delete items that are not relevant.

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes
@GalRogozinski
Copy link
Member

GalRogozinski left a comment

Good

Just a few changes


public final AsyncTransactionPruner transactionPruner;

public final MilestoneSolidifierImpl milestoneSolidifier;

This comment has been minimized.

@GalRogozinski

GalRogozinski Nov 20, 2018

Member

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 :-)

This comment has been minimized.

@hmoog

hmoog Nov 20, 2018

Contributor

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

This comment has been minimized.

@GalRogozinski

GalRogozinski Nov 20, 2018

Member

hmm
Once we will do proper DI we will fix it

For now it is fine

Show resolved Hide resolved src/main/java/com/iota/iri/service/API.java Outdated
Show resolved Hide resolved src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java
Show resolved Hide resolved src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceImpl.java Outdated

hmoog and others added some commits Nov 20, 2018

Update src/main/java/com/iota/iri/service/ledger/impl/LedgerServiceIm…
…pl.java

Co-Authored-By: hmoog <hm@mkjc.net>

@GalRogozinski GalRogozinski merged commit 474ba4c into iotaledger:dev-localsnapshots Nov 20, 2018

2 checks passed

buildkite/iri-build-jar-prs Build #185 passed and blocked
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@hmoog hmoog deleted the iotadevelopment:merge_dependencyhandling branch Nov 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment