mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
[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:
parent
c17083ce55
commit
5be62b5200
6 changed files with 6 additions and 6 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue