Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

ERROR block_updater # UpdateWatchdog.run failed #14

Open
erm3nda opened this issue Dec 29, 2015 · 1 comment
Open

ERROR block_updater # UpdateWatchdog.run failed #14

erm3nda opened this issue Dec 29, 2015 · 1 comment

Comments

@erm3nda
Copy link

erm3nda commented Dec 29, 2015

I found similar issues like:
![https://github.com/Crypto-Expert/stratum-mining/issues/68]
![https://github.com/viacoin/viacoin/issues/2]

My error:

ERROR block_updater # UpdatedWatchdog.run failed.
    Traceback (most recent call last):
    File "C\etc\etc\lib\block_updater.py, line 47, in run
    prevash  = util.reverse_hash((yield self.bitcoin_rpc.prevhash()))

Looking the file, i see that is calling getwork, wich I understand is not working anymore.
I've tried to play with the getblocktemplate but still no luck.

@defer.inlineCallbacks
def prevhash(self):
    resp = (yield self._call('getwork', []))
    try:
        defer.returnValue(json.loads(resp)['result']['data'][8:72])
    except Exception as e:
        log.exception("Cannot decode prevhash %s" % str(e))
        raise
@erm3nda
Copy link
Author

erm3nda commented Dec 29, 2015

Added:

I edited my prevhash() function according to ![ https://github.com/Crypto-Expert/stratum-mining/blob/master/lib/bitcoin_rpc.py] and problem has gone.

def prevhash(self):
    resp = (yield self._call('getblocktemplate', []))
    try:
        defer.returnValue(json.loads(resp)['result']['previousblockhash'])
        #defer.returnValue(json.loads(resp)['result']['data'][8:72])
    except Exception as e:
        log.exception("Cannot decode prevhash %s" % str(e))
        raise

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant