fix getblocktemplate for ppcoin. if error passing {} try passing nothing.
This commit is contained in:
parent
116e9df4e9
commit
63cce44bee
@ -70,8 +70,14 @@ class BitcoinRPC(object):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def getblocktemplate(self):
|
||||
resp = (yield self._call('getblocktemplate', [{}]))
|
||||
defer.returnValue(json.loads(resp)['result'])
|
||||
try:
|
||||
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'])
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def prevhash(self):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user