Skip to content
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

FAB-18070 Ch.Part.API: refactor to avoid support pattern #1617

Merged
merged 1 commit into from
Jul 20, 2020
Merged

FAB-18070 Ch.Part.API: refactor to avoid support pattern #1617

merged 1 commit into from
Jul 20, 2020

Conversation

tock-ibm
Copy link
Contributor

Avoid using the "support" pattern with the follower.
That is, do not pass a monolithic structure that embeds all
the dependencies of the follower. Instead, pass dependencies
as concrete types that implement individual interfaces that
the follower needs.

Some methods that are needed by both the follower and
consensus.Chains are promoted from ChainSupport to
ledgerResources along with respective tests.

Signed-off-by: Yoav Tock tock@il.ibm.com
Change-Id: I09e49951ce60e897b08499ef7ef1bf2a4652f834

Type of change

  • Improvement (improvement to code, performance, etc)

Related issues

Task: FAB-18070
Epic: FAB-17712

@tock-ibm tock-ibm requested a review from a team as a code owner July 19, 2020 09:40
Avoid using the "support" pattern with the follower.
That is, do not pass a monolithic structure that embeds all
the dependencies of the follower. Instead, pass dependencies
as concrete types that implement individual interfaces that
the follower needs.

Some methods that are needed by both the follower and
consensus.Chains are promoted from `ChainSupport` to
`ledgerResources` along with respective tests.

Signed-off-by: Yoav Tock <tock@il.ibm.com>
Change-Id: I09e49951ce60e897b08499ef7ef1bf2a4652f834
Copy link
Contributor

@jyellick jyellick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A significant improvement, thanks!

@jyellick jyellick merged commit 4326cc5 into hyperledger:master Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants