Skip to content

enable-disable service discovery for fabric gateway #156

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class FabricProperties {
"org.hyperledger.fabric.sdk.service_discovery.as_localhost";

private boolean localhostReportAddress;
private boolean discoveryEnabled = true;
private WalletConfig wallet;
private OrgConnectionConfig orgConnectionConfig;
private Client client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Gateway gateway(Wallet wallet) throws IOException {
builder
.identity(wallet, fabricProperties.getWallet().getClientUser().getName())
.networkConfig(networkConfigPath)
.discovery(true);
.discovery(fabricProperties.isDiscoveryEnabled());
return builder.connect();
}

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ metrics:
enable: false
fabric:
localhostReportAddress: true
discoveryEnabled: true
wallet:
path: wallet
adminUser:
Expand Down