diff --git a/src/models/StratumV1Client.ts b/src/models/StratumV1Client.ts index b2ccf2e..55458b5 100644 --- a/src/models/StratumV1Client.ts +++ b/src/models/StratumV1Client.ts @@ -322,7 +322,7 @@ export class StratumV1Client extends EasyUnsubscribe { await this.promiseSocket.write(job.response()); - console.log(`Sent new job to ${this.extraNonce}. (clearJobs: ${clearJobs}, fee?: ${!noFee})`) + console.log(`Sent new job to ${this.clientAuthorization.worker}.${this.extraNonce}. (clearJobs: ${clearJobs}, fee?: ${!noFee})`) } diff --git a/src/services/bitcoin-rpc.service.ts b/src/services/bitcoin-rpc.service.ts index b2b993b..556d909 100644 --- a/src/services/bitcoin-rpc.service.ts +++ b/src/services/bitcoin-rpc.service.ts @@ -60,10 +60,12 @@ export class BitcoinRpcService { public async SUBMIT_BLOCK(hexdata: string): Promise { let response: string = 'unknown'; try { - await this.client.submitblock({ + response = await this.client.submitblock({ hexdata }); - response = 'SUCCESS!'; + if (response == null) { + response = 'SUCCESS!'; + } console.log(`BLOCK SUBMISSION RESPONSE: ${response}`); console.log(hexdata); console.log(JSON.stringify(response));