mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
logging
This commit is contained in:
@@ -124,6 +124,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
|
|
||||||
await this.promiseSocket.write(JSON.stringify(this.clientSubscription.response(this.extraNonceAndSessionId)) + '\n');
|
await this.promiseSocket.write(JSON.stringify(this.clientSubscription.response(this.extraNonceAndSessionId)) + '\n');
|
||||||
} else {
|
} else {
|
||||||
|
console.error('Subscription validation error');
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
subscriptionMessage.id,
|
subscriptionMessage.id,
|
||||||
eStratumErrorCode.OtherUnknown,
|
eStratumErrorCode.OtherUnknown,
|
||||||
@@ -154,6 +155,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
//const response = this.buildSubscriptionResponse(configurationMessage.id);
|
//const response = this.buildSubscriptionResponse(configurationMessage.id);
|
||||||
await this.promiseSocket.write(JSON.stringify(this.clientConfiguration.response()) + '\n');
|
await this.promiseSocket.write(JSON.stringify(this.clientConfiguration.response()) + '\n');
|
||||||
} else {
|
} else {
|
||||||
|
console.error('Configuration validation error');
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
configurationMessage.id,
|
configurationMessage.id,
|
||||||
eStratumErrorCode.OtherUnknown,
|
eStratumErrorCode.OtherUnknown,
|
||||||
@@ -184,6 +186,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
//const response = this.buildSubscriptionResponse(authorizationMessage.id);
|
//const response = this.buildSubscriptionResponse(authorizationMessage.id);
|
||||||
await this.promiseSocket.write(JSON.stringify(this.clientAuthorization.response()) + '\n');
|
await this.promiseSocket.write(JSON.stringify(this.clientAuthorization.response()) + '\n');
|
||||||
} else {
|
} else {
|
||||||
|
console.error('Authorization validation error');
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
authorizationMessage.id,
|
authorizationMessage.id,
|
||||||
eStratumErrorCode.OtherUnknown,
|
eStratumErrorCode.OtherUnknown,
|
||||||
@@ -219,6 +222,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
await this.promiseSocket.write(JSON.stringify(this.clientSuggestedDifficulty.response(this.sessionDifficulty)) + '\n');
|
await this.promiseSocket.write(JSON.stringify(this.clientSuggestedDifficulty.response(this.sessionDifficulty)) + '\n');
|
||||||
this.usedSuggestedDifficulty = true;
|
this.usedSuggestedDifficulty = true;
|
||||||
} else {
|
} else {
|
||||||
|
console.error('Suggest difficulty validation error');
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
suggestDifficultyMessage.id,
|
suggestDifficultyMessage.id,
|
||||||
eStratumErrorCode.OtherUnknown,
|
eStratumErrorCode.OtherUnknown,
|
||||||
@@ -250,6 +254,7 @@ export class StratumV1Client extends EasyUnsubscribe {
|
|||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
console.error('Mining Submit validation error');
|
||||||
const err = new StratumErrorMessage(
|
const err = new StratumErrorMessage(
|
||||||
miningSubmitMessage.id,
|
miningSubmitMessage.id,
|
||||||
eStratumErrorCode.OtherUnknown,
|
eStratumErrorCode.OtherUnknown,
|
||||||
|
|||||||
Reference in New Issue
Block a user