Skip to content

Commit

Permalink
Kaspad: Add uacomment = kdx_<version>
Browse files Browse the repository at this point in the history
  • Loading branch information
supertypo committed Oct 6, 2023
1 parent 0fffd86 commit 70da5bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/interfaces/kaspad.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { dpc, Semaphore } = require("@aspectron/flow-async");
const utils = require("@aspectron/flow-utils");
const Daemon = require('../daemon');
const {Client:KaspaGRPC} = require('@kaspa/grpc-node');
const pkg = require("../../package");
const natUpnp = require("@runonflux/nat-upnp");

module.exports = class Kaspad extends Daemon {
Expand Down Expand Up @@ -50,6 +51,15 @@ module.exports = class Kaspad extends Daemon {
}

await new Promise(resolve => setTimeout(resolve, 500)); // Ensure "sink" has enough time to get ready to receive messages before proceeding

if (!("uacomment" in args)) {
const uacomment = `kdx_${pkg['version']}`
this.writeToSink(`KASPAD: Adding uacomment=${uacomment} to arguments\n`);
args['uacomment'] = uacomment;
} else if (!args['uacomment']) {
delete args['uacomment']; // Allow to disable uacomment
}

if (this.task.conf['upnpEnabled'] && args['listen'] && args['listen'].indexOf(":") !== -1) {
this.writeToSink(`UPNP: `+`ENABLED`.green+`. Set `+`"upnpEnabled": false`.yellow+` in Settings -> Advanced -> Service Configuration to disable\n`);
const nodePort = args['listen'].split(':')[1];
Expand Down

0 comments on commit 70da5bf

Please sign in to comment.