Merge pull request #188 from penner42/ppcoin-fix
[FIX] Coind error: Invalid mode for ppcoin, possibly others
This commit is contained in:
commit
d5bee92932
@ -70,8 +70,16 @@ class BitcoinRPC(object):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def getblocktemplate(self):
|
def getblocktemplate(self):
|
||||||
resp = (yield self._call('getblocktemplate', [{}]))
|
try:
|
||||||
defer.returnValue(json.loads(resp)['result'])
|
resp = (yield self._call('getblocktemplate', [{}]))
|
||||||
|
defer.returnValue(json.loads(resp)['result'])
|
||||||
|
# if internal server error try getblocktemplate without empty {} # ppcoin
|
||||||
|
except Exception as e:
|
||||||
|
if (str(e) == "500 Internal Server Error"):
|
||||||
|
resp = (yield self._call('getblocktemplate', []))
|
||||||
|
defer.returnValue(json.loads(resp)['result'])
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def prevhash(self):
|
def prevhash(self):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user