Skip to content

Commit

Permalink
[FAB-13207] Remove incorrect discovery options
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Stone committed Dec 10, 2018
1 parent c17083c commit 5be62b5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fabcar/javascript/invoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion fabcar/javascript/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion fabcar/javascript/registerUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion fabcar/typescript/src/invoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion fabcar/typescript/src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion fabcar/typescript/src/registerUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

1 comment on commit 5be62b5

@rohitkhatri
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I pass transient map to submitTransaction function of Contract class?

Please sign in to comment.