-
Notifications
You must be signed in to change notification settings - Fork 25
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
Introduce capability to get anchor peer nodes in a channel #133
Introduce capability to get anchor peer nodes in a channel #133
Conversation
fa6fff6
to
4f0716b
Compare
src/main/java/hlf/java/rest/client/service/impl/NetworkStatusImpl.java
Outdated
Show resolved
Hide resolved
4f0716b
to
0fababe
Compare
Signed-off-by: n0s09by <Nidhi.singh0@walmart.com>
0fababe
to
1f3e028
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.
Looks good, addressing the open nitpick comments would improve the readability.
@Override | ||
public ResponseEntity<ClientResponseModel> getAnchorPeerForChannel(String channelName) { | ||
Network network = gateway.getNetwork(channelName); | ||
Set<String> anchorPeersSet = new HashSet<>(); |
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.
[nitpick] declare just before where this Set will get used.
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.
Setting it here as it is getting used outside the try-catch blocks as well.
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.
you can return it directly from line # 107 instead of performing an assignment.
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.
Addressed, Thanks :)
src/main/java/hlf/java/rest/client/service/impl/NetworkStatusImpl.java
Outdated
Show resolved
Hide resolved
Signed-off-by: n0s09by <Nidhi.singh0@walmart.com>
src/main/java/hlf/java/rest/client/controller/FabricOperationsController.java
Outdated
Show resolved
Hide resolved
ae8f289
to
82a0239
Compare
@Override | ||
public ResponseEntity<ClientResponseModel> getAnchorPeerForChannel(String channelName) { | ||
Network network = gateway.getNetwork(channelName); | ||
Set<String> anchorPeersSet = new HashSet<>(); |
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.
you can return it directly from line # 107 instead of performing an assignment.
Signed-off-by: n0s09by <Nidhi.singh0@walmart.com>
82a0239
to
b23fe19
Compare
No description provided.