Uploaded image for project: 'Cello'
  1. Cello
  2. CE-454

Some parameters are not given value in the function of generateNetwork.

    XMLWordPrintable

Details

    • Task
    • Status: Complete
    • High
    • Resolution: Done
    • None
    • v1.0.0
    • Cello-Dashboard
    • None

    Description

      In the user-dashboard codes of file app/service/chain.js, Some paramters of the function generateNetwork work with no values. Which include peerConfig.grpc and peerConfig.event and is mark red below.

       

      async generateNetwork(chainId)

      {     const

      { ctx }

      = this;

          const chain = await ctx.model.Chain.findOne({ _id: chainId });

          const networkConfig = await ctx.model.NetworkConfig.findOne({ chain });

          const orgConfigs = await ctx.model.OrgConfig.find({ networkConfig }).sort('sequence');

          const ordererConfig = await ctx.model.OrdererConfig.findOne({ networkConfig });

          const network = {

            orderer: {

              url: `grpcs://${ordererConfig.url}`,

              'server-hostname': ordererConfig.serverHostName,

              tls_cacerts: '/var/www/app/lib/fabric/fixtures/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt',

            },

          };

          for (const index in orgConfigs)

      {       const orgConfig = orgConfigs[index];       const caConfig = await ctx.model.CaConfig.findOne(

      { networkConfig, sequence: orgConfig.sequence }

      );

            const peerConfigs = await ctx.model.PeerConfig.find({ networkConfig, orgConfig }).sort('sequence');

            const peers = {};

            for (const peerIndex in peerConfigs) {

              const peerConfig = peerConfigs[peerIndex];

              peers[`peer${peerConfig.sequence + 1}`] = {

                requests: `grpcs://${peerConfig.grpc}`,

                events: `grpcs://${peerConfig.event}`,

                'server-hostname': `peer${peerConfig.seq

      Attachments

        Activity

          People

            hightall Haitao Yue
            ritel126 xie ruitao
            xie ruitao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: