coin-hive-stratum
Advanced tools
Comparing version 2.3.1 to 2.3.2
@@ -126,3 +126,2 @@ "use strict"; | ||
} | ||
console.log("sent:", JSON.stringify(message)); | ||
_this.socket.write(JSON.stringify(message) + "\n"); | ||
@@ -139,3 +138,2 @@ } | ||
Connection.prototype.receive = function (message) { | ||
console.log("received:", message); | ||
var data = null; | ||
@@ -142,0 +140,0 @@ try { |
@@ -12,3 +12,2 @@ "use strict"; | ||
var uuid = require("uuid"); | ||
var Metrics_1 = require("./Metrics"); | ||
var Donation = /** @class */ (function () { | ||
@@ -111,12 +110,6 @@ function Donation(options) { | ||
Donation.prototype.handleAccepted = function (job) { | ||
Metrics_1.donationsCounter.inc(); | ||
Metrics_1.donationsMeter.mark(); | ||
var finishedJob = this.taken.find(function (j) { return j.job_id === job.job_id; }); | ||
if (finishedJob) { | ||
finishedJob.done = true; | ||
console.log("donation accepted (" + this.id + ")"); | ||
} | ||
else { | ||
console.log("donation error (" + this.id + "):", job); | ||
} | ||
}; | ||
@@ -123,0 +116,0 @@ Donation.prototype.handleError = function (error) { |
@@ -18,8 +18,1 @@ "use strict"; | ||
}); | ||
exports.donationsCounter = probe.counter({ | ||
name: "Donations" | ||
}); | ||
exports.donationsMeter = probe.meter({ | ||
name: "Donations per minute", | ||
samples: 60 | ||
}); |
@@ -174,3 +174,2 @@ "use strict"; | ||
donations.forEach(function (donation) { | ||
console.log("donation job sent to miner (" + _this.id + "):", job.job_id); | ||
_this.sendToMiner({ | ||
@@ -182,3 +181,2 @@ type: "job", | ||
if (!this.hasPendingDonations() && donations.length === 0) { | ||
console.log("job sent to miner (" + this.id + "):", job.job_id); | ||
this.sendToMiner({ | ||
@@ -240,7 +238,5 @@ type: "job", | ||
if (!this.isDonation(job)) { | ||
console.log("to pool"); | ||
this.sendToPool("submit", job); | ||
} | ||
else { | ||
console.log("to donation"); | ||
var donation = this.getDonation(job); | ||
@@ -247,0 +243,0 @@ donation.submit(job); |
{ | ||
"name": "coin-hive-stratum", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "proxy to use CoinHive miner on any stratum pool", | ||
@@ -5,0 +5,0 @@ "main": "build", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60175
1560