[FAB-13207] Remove incorrect discovery options

The TypeScript version of the FabCar app uses a dodgy
"as any" cast to get around a bug that has been fixed;
turns out the wrong name was being used (should have
been asLocalhost, not useLocalhost).

Note, because basic-network does not use TLS, we cannot
use service discovery. We can enable service discovery
when we migrate FabCar to BYFN instead.

Change-Id: I36dad1c8cc7380ca1123805ae3e74fe1e7665b40
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
This commit is contained in:
Simon Stone 2018-12-10 11:43:40 +00:00
parent c17083ce55
commit 5be62b5200
6 changed files with 6 additions and 6 deletions

View file

@ -30,7 +30,7 @@ async function main() {
// Create a new gateway for connecting to our peer node.
const gateway = new Gateway();
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { useLocalhost: true } });
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
// Get the network (channel) our contract is deployed to.
const network = await gateway.getNetwork('mychannel');

View file

@ -30,7 +30,7 @@ async function main() {
// Create a new gateway for connecting to our peer node.
const gateway = new Gateway();
await gateway.connect(ccp, { wallet, identity: 'user1' });
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
// Get the network (channel) our contract is deployed to.
const network = await gateway.getNetwork('mychannel');

View file

@ -37,7 +37,7 @@ async function main() {
// Create a new gateway for connecting to our peer node.
const gateway = new Gateway();
await gateway.connect(ccp, { wallet, identity: 'admin' });
await gateway.connect(ccp, { wallet, identity: 'admin', discovery: { enabled: false } });
// Get the CA client object from the gateway for interacting with the CA.
const ca = gateway.getClient().getCertificateAuthority();

View file

@ -28,7 +28,7 @@ async function main() {
// Create a new gateway for connecting to our peer node.
const gateway = new Gateway();
await (gateway as any).connect(ccp, { wallet, identity: 'user1', discovery: { useLocalhost: true } });
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
// Get the network (channel) our contract is deployed to.
const network = await gateway.getNetwork('mychannel');

View file

@ -28,7 +28,7 @@ async function main() {
// Create a new gateway for connecting to our peer node.
const gateway = new Gateway();
await gateway.connect(ccp, { wallet, identity: 'user1' });
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
// Get the network (channel) our contract is deployed to.
const network = await gateway.getNetwork('mychannel');

View file

@ -35,7 +35,7 @@ async function main() {
// Create a new gateway for connecting to our peer node.
const gateway = new Gateway();
await gateway.connect(ccp, { wallet, identity: 'admin' });
await gateway.connect(ccp, { wallet, identity: 'admin', discovery: { enabled: false } });
// Get the CA client object from the gateway for interacting with the CA.
const ca = gateway.getClient().getCertificateAuthority();