Trying to Run the node script for revenue distribution for Waves nodes and leasers. But getting the socket hang up error,In HTTP call of node script

68 views Asked by At

I Used this GitHub repository as a reference. https://github.com/plukkie/WavesLPoSDistributer

In that, config.json file is setup with all the details related to waves node. But' when i'm trying to run the script for collector sessions. I'm facing the socket hangup error. which is due to http request in node address.

Below is the code Which is responsible for generating error:

     var getAllAlias = function() {

     var AliasArr = [];
            var Aliases = JSON.parse(request('GET', config.node + '/alias/by-address/' + config.address, {
                'headers': {
                    'Connection': 'keep-alive'
                }
            }).getBody('utf8'));

        Aliases.forEach(function(alias)
        {
                         AliasArr.push(alias);
                         console.log(alias);
        });
    return AliasArr;
    }

Any help on this would be great, Thankyou

0

There are 0 answers