mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 17:15:03 -07:00
increment ids
This commit is contained in:
@@ -43,11 +43,11 @@ export class MiningSubmitMessage extends StratumBaseMessage {
|
||||
}
|
||||
|
||||
|
||||
public testNonceValue(job: MiningJob, submission: MiningSubmitMessage): number {
|
||||
public testNonceValue(clientId: string, job: MiningJob, submission: MiningSubmitMessage): number {
|
||||
|
||||
const nonce = parseInt(submission.nonce, 16);
|
||||
const versionMask = parseInt(submission.versionMask, 16);
|
||||
const extraNonce = 'ccc5d664';
|
||||
const extraNonce = clientId;
|
||||
const extraNonce2 = submission.extraNonce2;
|
||||
|
||||
const coinbaseTx = `${job.coinb1}${extraNonce}${extraNonce2}${job.coinb2}`;
|
||||
|
||||
@@ -16,7 +16,7 @@ export class SubscriptionMessage extends StratumBaseMessage {
|
||||
console.log('constructor SubscriptionMessage');
|
||||
}
|
||||
|
||||
public response() {
|
||||
public response(clientId: string) {
|
||||
return {
|
||||
id: null,
|
||||
error: null,
|
||||
@@ -24,7 +24,7 @@ export class SubscriptionMessage extends StratumBaseMessage {
|
||||
[
|
||||
['mining.notify', '64d8c004']
|
||||
], //subscription details
|
||||
'ccc5d664', //Extranonce1 - Hex-encoded, per-connection unique string which will be used for coinbase serialization later. Keep it safe!
|
||||
clientId, //Extranonce1 - Hex-encoded, per-connection unique string which will be used for coinbase serialization later. Keep it safe!
|
||||
8 //Extranonce2_size - Represents expected length of extranonce2 which will be generated by the miner.
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user