Skip to content

Commit 5be62b5

Browse files
author
Simon Stone
committed
[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>
1 parent c17083c commit 5be62b5

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

fabcar/javascript/invoke.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function main() {
3030

3131
// Create a new gateway for connecting to our peer node.
3232
const gateway = new Gateway();
33-
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { useLocalhost: true } });
33+
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
3434

3535
// Get the network (channel) our contract is deployed to.
3636
const network = await gateway.getNetwork('mychannel');

fabcar/javascript/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function main() {
3030

3131
// Create a new gateway for connecting to our peer node.
3232
const gateway = new Gateway();
33-
await gateway.connect(ccp, { wallet, identity: 'user1' });
33+
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
3434

3535
// Get the network (channel) our contract is deployed to.
3636
const network = await gateway.getNetwork('mychannel');

fabcar/javascript/registerUser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function main() {
3737

3838
// Create a new gateway for connecting to our peer node.
3939
const gateway = new Gateway();
40-
await gateway.connect(ccp, { wallet, identity: 'admin' });
40+
await gateway.connect(ccp, { wallet, identity: 'admin', discovery: { enabled: false } });
4141

4242
// Get the CA client object from the gateway for interacting with the CA.
4343
const ca = gateway.getClient().getCertificateAuthority();

fabcar/typescript/src/invoke.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function main() {
2828

2929
// Create a new gateway for connecting to our peer node.
3030
const gateway = new Gateway();
31-
await (gateway as any).connect(ccp, { wallet, identity: 'user1', discovery: { useLocalhost: true } });
31+
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
3232

3333
// Get the network (channel) our contract is deployed to.
3434
const network = await gateway.getNetwork('mychannel');

fabcar/typescript/src/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async function main() {
2828

2929
// Create a new gateway for connecting to our peer node.
3030
const gateway = new Gateway();
31-
await gateway.connect(ccp, { wallet, identity: 'user1' });
31+
await gateway.connect(ccp, { wallet, identity: 'user1', discovery: { enabled: false } });
3232

3333
// Get the network (channel) our contract is deployed to.
3434
const network = await gateway.getNetwork('mychannel');

fabcar/typescript/src/registerUser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function main() {
3535

3636
// Create a new gateway for connecting to our peer node.
3737
const gateway = new Gateway();
38-
await gateway.connect(ccp, { wallet, identity: 'admin' });
38+
await gateway.connect(ccp, { wallet, identity: 'admin', discovery: { enabled: false } });
3939

4040
// Get the CA client object from the gateway for interacting with the CA.
4141
const ca = gateway.getClient().getCertificateAuthority();

0 commit comments

Comments
 (0)