Skip to content

Commit 7d92984

Browse files
author
Alexander Blair
committed
Seed-fix: Hex not buf
1 parent 91b22c4 commit 7d92984

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/xmr.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function getJob(miner, activeBlockTemplate, bashCache) {
120120
difficulty: miner.difficulty,
121121
diffHex: miner.diffHex,
122122
submissions: [],
123-
seed_hash: activeBlockTemplate.seedHash,
123+
seed_hash: activeBlockTemplate.seedHash ? activeBlockTemplate.seedHash.toString('hex') : null,
124124
templateID: activeBlockTemplate.id
125125
};
126126

@@ -130,7 +130,7 @@ function getJob(miner, activeBlockTemplate, bashCache) {
130130
job_id: newJob.id,
131131
target: target,
132132
id: miner.id,
133-
seed_hash: activeBlockTemplate.seedHash,
133+
seed_hash: activeBlockTemplate.seedHash ? activeBlockTemplate.seedHash.toString('hex') : null,
134134
height: activeBlockTemplate.height
135135
};
136136
return miner.cachedJob;
@@ -147,13 +147,13 @@ function getMasterJob(pool, workerID) {
147147
reserved_offset: activeBlockTemplate.reservedOffset,
148148
worker_offset: activeBlockTemplate.workerOffset,
149149
target_diff: activeBlockTemplate.targetDiff,
150-
seed_hash: activeBlockTemplate.seedHash,
150+
seed_hash: activeBlockTemplate.seedHash ? activeBlockTemplate.seedHash.toString('hex') : null,
151151
target_diff_hex: activeBlockTemplate.targetHex
152152
};
153153
let localData = {
154154
id: workerData.id,
155155
masterJobID: activeBlockTemplate.job_id,
156-
seed_hash: activeBlockTemplate.seedHash,
156+
seed_hash: activeBlockTemplate.seedHash ? activeBlockTemplate.seedHash.toString('hex') : null,
157157
poolNonce: activeBlockTemplate.poolNonce
158158
};
159159
if (!(workerID in pool.poolJobs)) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy