Skip to content

Commit

Permalink
Allow discovery to be turned off in fabric-network
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
andrew-coleman committed Nov 30, 2018
1 parent e3b6d83 commit 765b159
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion fabric-client/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"1.0": "./impl/NetworkConfig_1_0.js"
},
"grpc-wait-for-ready-timeout": 3000,
"initialize-with-discovery": false,
"discovery-as-localhost": true,
"discovery-cache-life": 300000,
"discovery-protocol": "grpcs",
Expand Down
2 changes: 1 addition & 1 deletion fabric-network/lib/gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class Gateway {
strategy: EventStrategies.MSPID_SCOPE_ALLFORTX
},
discovery: {
enabled: true
enabled: Client.getConfigSetting('initialize-with-discovery', true)
}
};
}
Expand Down

0 comments on commit 765b159

Please sign in to comment.