8000 Fixes py2exe issue with midstatec packaging · coderlv/stratum-mining-proxy@c4df613 · GitHub
[go: up one dir, main page]

Skip to content

Commit c4df613

Browse files
author
slush
committed
Fixes py2exe issue with midstatec packaging
1 parent 61bcdc9 commit c4df613

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mining_libs/jobs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
import stratum.logger
1212
log = stratum.logger.get_logger('proxy')
1313

14+
# This fix py2exe issue with packaging the midstate module
15+
from midstate import calculateMidstate as __unusedimport
16+
1417
try:
1518
from midstatec.midstatec import test as midstateTest, midstate as calculateMidstate
1619
if not midstateTest():
@@ -23,7 +26,7 @@
2326
from midstate import calculateMidstate
2427
except ImportError:
2528
calculateMidstate = None
26-
log.warning("No midstate generator available. Some old miners won't work properly.")
29+
log.exception("No midstate generator available. Some old miners won't work properly.")
2730

2831
class Job(object):
2932
def __init__(self):
@@ -251,4 +254,4 @@ def submit(self, header, worker_name):
251254
nonce = header[noncepos:noncepos+8]
252255

253256
# 5. Submit share to the pool
254-
return self.f.rpc('mining.submit', [worker_name, job.job_id, extranonce2_hex, ntime, nonce])
257+
return self.f.rpc('mining.submit', [worker_name, job.job_id, extranonce2_hex, ntime, nonce])

0 commit comments

Comments
 ( 2F81 0)
0