debugging submitblock output
This commit is contained in:
parent
b80dae572c
commit
cc04405826
@ -154,10 +154,17 @@ class BitcoinRPC(object):
|
|||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def blockexists(self, hash_hex):
|
def blockexists(self, hash_hex):
|
||||||
resp = (yield self._call('getblock', [hash_hex,]))
|
log.debug("Checking if the following Block Exists: %s", hash_hex)
|
||||||
if "hash" in json.loads(resp)['result'] and json.loads(resp)['result']['hash'] == hash_hex:
|
try:
|
||||||
log.debug("Block Confirmed: %s" % hash_hex)
|
resp = (yield self._call('getblock', [hash_hex,]))
|
||||||
defer.returnValue(True)
|
log.debug("GETBLOCK RESULT: %s", resp)
|
||||||
else:
|
if "hash" in json.loads(resp)['result'] and json.loads(resp)['result']['hash'] == hash_hex:
|
||||||
log.info("Cannot find block for %s" % hash_hex)
|
log.debug("Block Confirmed: %s" % hash_hex)
|
||||||
defer.returnValue(False)
|
defer.returnValue(True)
|
||||||
|
else:
|
||||||
|
log.info("Cannot find block for %s" % hash_hex)
|
||||||
|
defer.returnValue(False)
|
||||||
|
except Exception as e:
|
||||||
|
log.info("Cannot find block for %s" % hash_hex)
|
||||||
|
defer.returnValue(False)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user