Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 765b159

Browse files
Allow discovery to be turned off in fabric-network
The Gateway API enables discovery by default (hard coded). The Client API disables discovery by default but allows it to be turned on using the mechanism in Config.js This patch changes the gateway API to default discovery to ‘true’ but allow it to be overridden by the above mechanism. By removing the setting from default.json, it will pick up the default value from the code (false in channel.js, true in gateway.js) Change-Id: I068e302cae888e414371766dfee049fabb59b8ff Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
1 parent e3b6d83 commit 765b159

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

fabric-client/config/default.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"1.0": "./impl/NetworkConfig_1_0.js"
2424
},
2525
"grpc-wait-for-ready-timeout": 3000,
26-
"initialize-with-discovery": false,
2726
"discovery-as-localhost": true,
2827
"discovery-cache-life": 300000,
2928
"discovery-protocol": "grpcs",

fabric-network/lib/gateway.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Gateway {
104104
strategy: EventStrategies.MSPID_SCOPE_ALLFORTX
105105
},
106106
discovery: {
107-
enabled: true
107+
enabled: Client.getConfigSetting('initialize-with-discovery', true)
108108
}
109109
};
110110
}

0 commit comments

Comments
 (0)