I have a devnet and a few nodes I'm running on my local machine. However, whenever I try to run "node dashConnectDevnet.js", I get the error, even though devnet is running.
the error
node1.conf
node2.conf
dashConnectDevnet.js:
the error
(node:101695) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.(Use `node --trace-deprecation ...` to show where the warning was created)Something went wrong: ResponseError: request to http://127.0.0.1:20000/ failed, reason: socket hang up at JsonRpcTransport.createJsonTransportError (/home/antun_daily/node_modules/@dashevo/dapi-client/lib/transport/JsonRpcTransport/createJsonTransportError.js:50:12) at JsonRpcTransport.request (/home/antun_daily/node_modules/@dashevo/dapi-client/lib/transport/JsonRpcTransport/JsonRpcTransport.js:93:34) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async connect (/home/antun_daily/Faks/Zavrsni/DashConfDocs/dashConnectDevnet.js:10:10) { code: 'ECONNRESET', data: {}, dapiAddress: DAPIAddress { protocol: 'http', host: '127.0.0.1', port: 20000, proRegTxHash: undefined, allowSelfSignedCertificate: false, banCount: 0, banStartTime: undefined }}node1.conf
devnet=dashblog[devnet]port=20000rpcport=20001listen=1bind=127.0.0.1rpcuser=user1rpcpassword=mypasswordsporkaddr=yZDB9spysPHJcRRUiWCja1XLYen6vmG1h5sporkkey=cN6ovAu2nmabH8mVRH8RJFU13HNPhDhYsfGdFJxaSFnqpKTiNyNSdatadir=/home/antun_daily/Faks/Zavrsni/DashConfDocs/node1highsubsidyblocks=500highsubsidyfactor=10node2.conf
devnet=dashblog[devnet]port=20002rpcport=20003listen=1bind=127.0.0.1addnode=127.0.0.1:20000rpcuser=user2rpcpassword=mypasswordsporkaddr=yZDB9spysPHJcRRUiWCja1XLYen6vmG1h5sporkkey=cN6ovAu2nmabH8mVRH8RJFU13HNPhDhYsfGdFJxaSFnqpKTiNyNSdatadir=/home/antun_daily/Faks/Zavrsni/DashConfDocs/node2highsubsidyblocks=500highsubsidyfactor=10dashConnectDevnet.js:
const Dash = require('dash');const client = new Dash.Client({ dapiAddresses: [ { host: '127.0.0.1', port: 20000, protocol: 'http' }, { host: '127.0.0.1', port: 20002, protocol: 'http' }, ],});async function connect() { return await client.getDAPIClient().core.getBestBlockHash();}connect() .then((d) => console.log('Connected. Best block hash:\n', d)) .catch((e) => console.error('Something went wrong:\n', e)) .finally(() => client.disconnect());